2013 Jun 11 8:07 AM
Dear Experts,
I have created a BDC for T-code FF32 using Call Transaction method and User wants to execute the BDC in the background. I need to know that is it possible to execute a BDC created using Call Transaction method in Background through SM36.
Thanks and Regards,
Mahesh
Dear Experts,
I have created a BDC for T-code FF32 using Call Transaction method and User wants to execute the BDC in the background. I need to know that is it possible to execute a BDC created using Call Transaction method in Background through SM36.
Thanks and Regards,
Mahesh
2013 Jun 11 8:53 AM
Perform some search on Creating Batch Input Sessions and report RSBDCSUB.
Alternative, create a Z-report with parameters similar to the CALL TRANSACTION statement, usage of NO-DISPLAY parameters allow usage of almost any type of parameters.
Regards,
Raymond
2013 Jun 11 9:03 AM
Hi Mahesh,
use coding like this.
data: opt type ctu_params.
opt-updmode = 'E'.
call transaction <tcode> using <bdc_data_tab> options from <opt>
Kind Regards
Robert
2013 Jun 11 9:04 AM
Hi Mahesh ,
You can try this way to run BDC in Call Transaction method in Background through SM36.
TYPES : BEGIN OF TY_FILE,
MBRSH TYPE MARA-MBRSH,
MTART TYPE MARA-MTART,
MAKTX TYPE MAKT-MAKTX,
MEINS TYPE MARA-MEINS,
END OF TY_FILE.
DATA : I_FILE TYPE TABLE OF TY_FILE .
DATA : WA_FILE TYPE TY_FILE .
DATA : LV_MSG TYPE STRING .
**********************BDC DATA DECLARARATIONS
DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
DATA: MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
BREAK-POINT .
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'C:\MARADATA.TXT' " Give File Path (File MARADATA.TXT should maintain in this path)
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = I_FILE.
LOOP AT I_FILE INTO WA_FILE .
perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MTART'.
perform bdc_field using 'BDC_OKCODE'
'=AUSW'.
perform bdc_field using 'RMMG1-MBRSH'
WA_FILE-MBRSH.
perform bdc_field using 'RMMG1-MTART'
WA_FILE-MTART.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
'X'.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
perform bdc_field using 'MAKT-MAKTX'
WA_FILE-MAKTX.
perform bdc_field using 'BDC_CURSOR'
'MARA-MEINS'.
perform bdc_field using 'MARA-MEINS'
WA_FILE-MEINS.
perform bdc_field using 'MARA-MTPOS_MARA'
'NORM'.
CALL TRANSACTION 'MM01'
USING bdcdata
UPDATE 'A'
MODE 'N' " 'N' BDC in a background job.
MESSAGES INTO MESSTAB .
If SY-SUBRC = 0.
Perform display_success_rec.
Else .
Perform display_error_rec.
Endif.
CLEAR WA_FILE .
REFRESH BDCDATA.
CLEAR BDCDATA.
REFRESH MESSTAB .
CLEAR MESSTAB.
ENDLOOP .
2013 Jun 11 9:22 AM
Hi,
I also depends on the inputs for your bdc. Are you using external file to upload from presentation server? if so then your bdc will not work. For this to work you need to use datasets.
Regards,
Madhumahesh.
2013 Jun 11 9:45 AM
Thanks for all the replies..
@Madhumahesh:- I m not using any flat file.. Simply data will be fetched from the Ztable and as per that data BDC will execute.
2013 Jun 11 10:24 AM
Hi,
Then you can use mode 'N' in your call transaction (also advised by above members) and run your bdc in background.
Regards,
Madhumahesh.
2013 Jun 11 10:40 AM
Hi,
In SM36 you can schedule the program by placing MODE 'N' in call transaction stmt. Are you facing any problem in scheduling ?
2013 Jun 11 10:25 PM
Hi,
You can run call transaction in background by set mode "N". First create a report program with call transaction and create back ground job with this program in sm36.
If you have any selection screen or controls(alv grid----) in your transaction it will give erorr.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |