Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

BDC to call pa30 to create pernr?

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!

Tags:
Former Member
Former Member replied

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.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question