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
1,253

Hi ,

i have a file with 10 records i uploaded it and used call transaction .in the third record there is a fake field named order number.so in the bdcmsggoll it is diplaying the remaining 7 records with the same error

as 3rd record ie in the output it writed the same 3rd record error 8 times please suggest.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,226

hi,

Can you be more specific about your call transaction mode..?

I guess you are running it in MODE 'N' i.e the reason you are getting the error repeated for 8 times.

This is because Call transaction is synchronous at the data level, that is the reason for

one fake record the processing stops until unless the error is handled, you

get the message in the BDCMSGCOLL.

secondly, for every call make sure you are clearing the fields.

Thanks

Sharath

Hi ,

i have a file with 10 records i uploaded it and used call transaction .in the third record there is a fake field named order number.so in the bdcmsggoll it is diplaying the remaining 7 records with the same error

as 3rd record ie in the output it writed the same 3rd record error 8 times please suggest.

9 REPLIES 9
Read only

Former Member
0 Likes
1,226

please check, you are not clearing all your variables.

Read only

0 Likes
1,226

also run the bdc in mode display error.

Read only

Former Member
0 Likes
1,227

hi,

Can you be more specific about your call transaction mode..?

I guess you are running it in MODE 'N' i.e the reason you are getting the error repeated for 8 times.

This is because Call transaction is synchronous at the data level, that is the reason for

one fake record the processing stops until unless the error is handled, you

get the message in the BDCMSGCOLL.

secondly, for every call make sure you are clearing the fields.

Thanks

Sharath

Read only

0 Likes
1,226

yeah iam using the no screen mode and also it is synchoronous mode so if i have 30 records and the 3 rd record is fake you mean to say unless until the 3rd record is set right remaining will not be processed???? here is the code

FORM FILL_ORDER_DETAILS .

  • Inital Screen

PERFORM add_bdc_screen USING

'ZCII_MAZZA_ORDER_CONFIRMATION' '1000'.

CLEAR T_BDC.

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,

'BDC_OKCODE' 'EECAN'.

ENDFORM. " FILL_ORDER_DETAILS

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.

CALL TRANSACTION 'ZC10' USING t_bdc MODE 'N' UPDATE 'S' MESSAGES

INTO T_BDC_MESSAGES.

CLEAR WA_INFILE.

ENDLOOP.

Read only

0 Likes
1,226

hi

clear the work area as you are using loop

And clear error table before call transaction statement.

this problem is because of clear only .

Clear every work area and headers which are in loop .

While populating bdc field and bdc value r u clearing every time check it once .

Read only

0 Likes
1,226

Hi,

Did u REFRESH the internal table T_BDC_MESSAGES before every transaction call???


FORM FILL_ORDER_DETAILS .

Inital Screen 
PERFORM add_bdc_screen USING
'ZCII_MAZZA_ORDER_CONFIRMATION' '1000'.
CLEAR T_BDC.

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,
'BDC_OKCODE' 'EECAN'.


ENDFORM. " FILL_ORDER_DETAILS

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.
REFRESH: T_BDC_MESSAGES[].  "Refresh here.
CALL TRANSACTION 'ZC10' USING t_bdc MODE 'N' UPDATE 'S' MESSAGES
INTO T_BDC_MESSAGES.
CLEAR WA_INFILE.
ENDLOOP.

Thanks,

Vinod.

Read only

0 Likes
1,226

Hi,

I think the problem is in BDCMSGCOLL internal table. It is Not clearing the Values of primary key after displaying Error Record. Try to Resolve it by debug it in All Screen mode first. Then change it into No Screen mode.

Read only

0 Likes
1,226

HI,

The internal table T_BDC if its a table with header line clear it at the first line of the form..endform and also use refresh statement just after the call transaction statement.

If its without clear the work area of the table in the first line of form...endform and also refresh the table after call transaction, its containing the same older records for rest of the processing that's the reason the error message starting from 3rd record is being carried out until the total processing.

secondly,

I have noticed you using the following statement.

concatenate v_datum+0(2) '.' v_datum+2(2) '.' v_datum+4(4)
into wa_infile-budat.

Seems like you are using to handle the screen field of date. Instead of concatenating use the write to statement.

write input to wa_infile-budat.. This will handle the date format for every user format. Because in your case the user format for now it may ne dd.mm.yyyy later if its changed to dd-mm-yyyy it may be a problem in running the code smoothly. (Just being informative....)

Thanks

Sharath

Read only

Former Member
0 Likes
1,226

You want to mention the display mode as 'E' and should clear the fields every time.

Regards,

Joan