Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BDC to call pa30 to create pernr?

Former Member
0 Kudos

Hi experts,

Can anyone show me a batch input example which calls the transaction pa30 to create a new pernr under the infotype 0000?

Thanks indeed in advance!

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Try this :

report Z_recording_pa30
       no standard page heading line-size 255.

include bdcrecx1.

start-of-selection.

perform open_group.

perform bdc_dynpro      using 'SAPMP50A' '1000'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'RP50G-PERNR'
                              '19'.
perform bdc_field       using 'RP50G-TIMR6'
                              'X'.
perform bdc_field       using 'BDC_CURSOR'
                              'RP50G-CHOIC'.
perform bdc_field       using 'RP50G-CHOIC'
                              '0000'.
perform bdc_dynpro      using 'SAPMP50A' '1000'.
perform bdc_field       using 'BDC_CURSOR'
                              'RP50G-PERNR'.
perform bdc_field       using 'BDC_OKCODE'
                              '=INS'.
perform bdc_field       using 'RP50G-PERNR'
                              '19'.
perform bdc_field       using 'RP50G-TIMR6'
                              'X'.
perform bdc_field       using 'RP50G-CHOIC'
                              'Actions'.
perform bdc_dynpro      using 'MP000000' '2000'.
perform bdc_field       using 'BDC_CURSOR'
                              'P0000-BEGDA'.
perform bdc_field       using 'BDC_OKCODE'
                              'UPD'.
perform bdc_field       using 'PSPAR-PERNR'
                              '      19'.
perform bdc_field       using 'P0000-BEGDA'
                              '2008.09.01'.
perform bdc_field       using 'P0000-ENDDA'
                              '9999.12.31'.
perform bdc_field       using 'P0000-MASSN'
                              '01'.
perform bdc_field       using 'PSPAR-WERKS'
                              '1000'.
perform bdc_field       using 'PSPAR-PERSG'
                              '1'.
perform bdc_field       using 'PSPAR-PERSK'
                              '60'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_CURSOR'
                              '04/08'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PICK'.
perform bdc_dynpro      using 'MP000000' '2000'.
perform bdc_field       using 'P0000-BEGDA'
                              '2008.09.01'.
perform bdc_field       using 'PSPAR-PLANS'
                              '50011219'.
perform bdc_field       using 'PSPAR-WERKS'
                              '2600'.
perform bdc_field       using 'PSPAR-PERSG'
                              '1'.
perform bdc_field       using 'PSPAR-PERSK'
                              'DI'.
perform bdc_dynpro      using 'MP000000' '2000'.
perform bdc_field       using 'BDC_OKCODE'
                              '/EBCK'.
perform bdc_field       using 'BDC_CURSOR'
                              'PSPAR-PLANS'.
perform bdc_dynpro      using 'SAPLSPO1' '0200'.
perform bdc_field       using 'BDC_OKCODE'
                              '=YES'.
perform bdc_transaction using 'PA30'.

perform close_group.

Regards,

Swapna.

8 REPLIES 8

Former Member
0 Kudos

Does anyone know BDC to call transaction?

Thanks!

Former Member
0 Kudos

Hi

go to SHDB...And give ur TCODE:pa30..recording s copleted and save back....(While doin recording u discuss with ur functional)

After recording u have develop ur own program.

Upload: gui_upload

Download:gui_download.

if u r using call transaction:

CALL TRANSACTION 'FK05' USING lt_bdcdata

MODE p_mode

MESSAGES INTO lt_messtab.

U need to declare like that in ur program.

Note:

If u need message explictely u can declarre ur program

Regrads:

Prabu

Former Member
0 Kudos

HI,

first u look into forum for creating BDCs.. there are lot of threads available.. decide upon using call transaction or session method..

i will suggest u to use call transaction method for infotype creation..

just create a notepad with the list of PERNR and use GUI_UPLOAD to load it into internal tables.. then loop ur CALL TRANSACTION PA30 with BDC_DATA based on the number of entries in ur internal table...

0 Kudos

Thanks. My data is got from a screen which I created but not from a external table. So is BDC also used?

GauthamV
Active Contributor
0 Kudos

hi,

use this program.

RPUSTD00.

Former Member
0 Kudos

Hi,

Try this :

report Z_recording_pa30
       no standard page heading line-size 255.

include bdcrecx1.

start-of-selection.

perform open_group.

perform bdc_dynpro      using 'SAPMP50A' '1000'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'RP50G-PERNR'
                              '19'.
perform bdc_field       using 'RP50G-TIMR6'
                              'X'.
perform bdc_field       using 'BDC_CURSOR'
                              'RP50G-CHOIC'.
perform bdc_field       using 'RP50G-CHOIC'
                              '0000'.
perform bdc_dynpro      using 'SAPMP50A' '1000'.
perform bdc_field       using 'BDC_CURSOR'
                              'RP50G-PERNR'.
perform bdc_field       using 'BDC_OKCODE'
                              '=INS'.
perform bdc_field       using 'RP50G-PERNR'
                              '19'.
perform bdc_field       using 'RP50G-TIMR6'
                              'X'.
perform bdc_field       using 'RP50G-CHOIC'
                              'Actions'.
perform bdc_dynpro      using 'MP000000' '2000'.
perform bdc_field       using 'BDC_CURSOR'
                              'P0000-BEGDA'.
perform bdc_field       using 'BDC_OKCODE'
                              'UPD'.
perform bdc_field       using 'PSPAR-PERNR'
                              '      19'.
perform bdc_field       using 'P0000-BEGDA'
                              '2008.09.01'.
perform bdc_field       using 'P0000-ENDDA'
                              '9999.12.31'.
perform bdc_field       using 'P0000-MASSN'
                              '01'.
perform bdc_field       using 'PSPAR-WERKS'
                              '1000'.
perform bdc_field       using 'PSPAR-PERSG'
                              '1'.
perform bdc_field       using 'PSPAR-PERSK'
                              '60'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_CURSOR'
                              '04/08'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PICK'.
perform bdc_dynpro      using 'MP000000' '2000'.
perform bdc_field       using 'P0000-BEGDA'
                              '2008.09.01'.
perform bdc_field       using 'PSPAR-PLANS'
                              '50011219'.
perform bdc_field       using 'PSPAR-WERKS'
                              '2600'.
perform bdc_field       using 'PSPAR-PERSG'
                              '1'.
perform bdc_field       using 'PSPAR-PERSK'
                              'DI'.
perform bdc_dynpro      using 'MP000000' '2000'.
perform bdc_field       using 'BDC_OKCODE'
                              '/EBCK'.
perform bdc_field       using 'BDC_CURSOR'
                              'PSPAR-PLANS'.
perform bdc_dynpro      using 'SAPLSPO1' '0200'.
perform bdc_field       using 'BDC_OKCODE'
                              '=YES'.
perform bdc_transaction using 'PA30'.

perform close_group.

Regards,

Swapna.

Former Member
0 Kudos

Hi Wuyia,

refer to the link below:

With luck,

Pritam.

Former Member
0 Kudos

Hi Wuyia,

Check this one:

[BDC code for PA30|]

Regards,

Chandra Sekhar