2009 Mar 13 5:53 AM
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.
2009 Mar 13 6:00 AM
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.
2009 Mar 13 5:57 AM
2009 Mar 13 6:00 AM
2009 Mar 13 6:00 AM
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
2009 Mar 13 6:28 AM
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.
2009 Mar 13 6:35 AM
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 .
2009 Mar 13 6:38 AM
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.
2009 Mar 13 6:41 AM
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.
2009 Mar 13 6:46 AM
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
2009 Mar 13 6:44 AM
You want to mention the display mode as 'E' and should clear the fields every time.
Regards,
Joan