Application Development and Automation 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: 
Read only

regarding call transaction

Former Member
0 Likes
524

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

1 ACCEPTED SOLUTION
Read only

former_member376453
Contributor
0 Likes
497

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 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.

2 REPLIES 2
Read only

Former Member
0 Likes
497

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

Read only

former_member376453
Contributor
0 Likes
498

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.