2008 Sep 01 9:17 AM
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!
2008 Sep 01 10:08 AM
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.
2008 Sep 01 9:39 AM
2008 Sep 01 10:00 AM
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
2008 Sep 01 10:01 AM
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...
2008 Sep 01 10:11 AM
Thanks. My data is got from a screen which I created but not from a external table. So is BDC also used?
2008 Sep 01 10:06 AM
2008 Sep 01 10:08 AM
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.
2008 Sep 01 10:11 AM
2008 Sep 01 10:14 AM