2009 Mar 17 12:20 AM
Hi I have a customised transaction
i have to write bdc for this transaction for the records in the file.
i have done the recording for the forst record and used the code
but after first record iam getting a error message saying no batch input for the screen
iam filing the first record and pressing execute and out put mesaage displays then call transaction shouldbe completed and got to the next record in the loop where as it is not going to the next record
but stoping after first record.please suggest.
LOOP AT tbl_infile into wa_infile.
move wa_infile-budat to v_datum .
concatenate v_datum0(2) '.' v_datum2(2) '.' v_datum+4(4)
into wa_infile-budat.
DATA:count type i.
PERFORM FILL_ORDER_DETAILS.
CLEAR: T_BDC_MESSAGES[].
REFRESH: T_BDC_MESSAGES[].
CALL TRANSACTION 'ZC10' USING t_bdc MODE 'A' UPDATE 'S' MESSAGES
INTO T_BDC_MESSAGES.
CLEAR WA_INFILE.
clear T_BDC_MESSAGES.
CLEAR TBL_INFILE.
CLEAR T_BDC.
REFRESH T_BDC.
ENDLOOP.
PERFORM add_bdc_screen USING
'ZCII_MAZZA_ORDER_CONFIRMATION' '1000'.
PERFORM add_bdc_field USING:
'BDC_CURSOR' 'P_STP_MN',
'BDC_OKCODE' '=ONLI',
'P_AUFNR' wa_infile-AUFNR,
'P_DATUV' wa_infile-BUDAT,
'P_CONF' 'X',
'P_SH_MAD' wa_infile-TUBES,
'P_SH_ROL' wa_infile-SRAP,
'P_BATCH' wa_infile-BATCHES,
'P_MAC_HR' wa_infile-RUNMIN,
'P_STP_MN' wa_infile-STOPMIN.
PERFORM add_bdc_screen USING
'SAPMSSY0' '0120'.
PERFORM add_bdc_field USING:
'BDC_OKCODE' '=%EX'.
PERFORM add_bdc_screen USING
'ZCII_MAZZA_ORDER_CONFIRMATION' '1000'.
PERFORM add_bdc_field USING:
'BDC_OKCODE' '=/EENDE',
'BDC_CURSOR' 'P_AUFNR'.
ENDFORM. " FILL_ORDER_DETAILS
2009 Mar 17 12:46 AM
Hi- I think your error is, when you are clearing the main table in the loop. Code you have written :
LOOP AT tbl_infile into wa_infile.
move wa_infile-budat to v_datum .
concatenate v_datum+0(2) '.' v_datum+2(2) '.' v_datum+4(4)
into wa_infile-budat.
DATA:count type i.
PERFORM FILL_ORDER_DETAILS.
CLEAR: T_BDC_MESSAGES[].
REFRESH: T_BDC_MESSAGES[].
CALL TRANSACTION 'ZC10' USING t_bdc MODE 'A' UPDATE 'S' MESSAGES
INTO T_BDC_MESSAGES.
CLEAR WA_INFILE.
clear T_BDC_MESSAGES.
*CLEAR TBL_INFILE.* " Do not clear this, as this table hold all the data. You are clearing this table so
" Loop is only for first data
CLEAR T_BDC.
REFRESH T_BDC.
ENDLOOP.
Hi I have a customised transaction
i have to write bdc for this transaction for the records in the file.
i have done the recording for the forst record and used the code
but after first record iam getting a error message saying no batch input for the screen
iam filing the first record and pressing execute and out put mesaage displays then call transaction shouldbe completed and got to the next record in the loop where as it is not going to the next record
but stoping after first record.please suggest.
LOOP AT tbl_infile into wa_infile.
move wa_infile-budat to v_datum .
concatenate v_datum0(2) '.' v_datum2(2) '.' v_datum+4(4)
into wa_infile-budat.
DATA:count type i.
PERFORM FILL_ORDER_DETAILS.
CLEAR: T_BDC_MESSAGES[].
REFRESH: T_BDC_MESSAGES[].
CALL TRANSACTION 'ZC10' USING t_bdc MODE 'A' UPDATE 'S' MESSAGES
INTO T_BDC_MESSAGES.
CLEAR WA_INFILE.
clear T_BDC_MESSAGES.
CLEAR TBL_INFILE.
CLEAR T_BDC.
REFRESH T_BDC.
ENDLOOP.
PERFORM add_bdc_screen USING
'ZCII_MAZZA_ORDER_CONFIRMATION' '1000'.
PERFORM add_bdc_field USING:
'BDC_CURSOR' 'P_STP_MN',
'BDC_OKCODE' '=ONLI',
'P_AUFNR' wa_infile-AUFNR,
'P_DATUV' wa_infile-BUDAT,
'P_CONF' 'X',
'P_SH_MAD' wa_infile-TUBES,
'P_SH_ROL' wa_infile-SRAP,
'P_BATCH' wa_infile-BATCHES,
'P_MAC_HR' wa_infile-RUNMIN,
'P_STP_MN' wa_infile-STOPMIN.
PERFORM add_bdc_screen USING
'SAPMSSY0' '0120'.
PERFORM add_bdc_field USING:
'BDC_OKCODE' '=%EX'.
PERFORM add_bdc_screen USING
'ZCII_MAZZA_ORDER_CONFIRMATION' '1000'.
PERFORM add_bdc_field USING:
'BDC_OKCODE' '=/EENDE',
'BDC_CURSOR' 'P_AUFNR'.
ENDFORM. " FILL_ORDER_DETAILS
2009 Mar 17 12:28 AM
Hi,
Wanted to know if you have written the call transaction in FORM FILL_ORDER_DETAILS
Please remove that and write the loop in different form, and apart from that also remove this line....
CLEAR TBL_INFILE.
Regards,
Siddarth
2009 Mar 17 12:46 AM
Hi- I think your error is, when you are clearing the main table in the loop. Code you have written :
LOOP AT tbl_infile into wa_infile.
move wa_infile-budat to v_datum .
concatenate v_datum+0(2) '.' v_datum+2(2) '.' v_datum+4(4)
into wa_infile-budat.
DATA:count type i.
PERFORM FILL_ORDER_DETAILS.
CLEAR: T_BDC_MESSAGES[].
REFRESH: T_BDC_MESSAGES[].
CALL TRANSACTION 'ZC10' USING t_bdc MODE 'A' UPDATE 'S' MESSAGES
INTO T_BDC_MESSAGES.
CLEAR WA_INFILE.
clear T_BDC_MESSAGES.
*CLEAR TBL_INFILE.* " Do not clear this, as this table hold all the data. You are clearing this table so
" Loop is only for first data
CLEAR T_BDC.
REFRESH T_BDC.
ENDLOOP.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |