‎2006 Feb 07 3:29 AM
Hello guys,
I recently modified a BDC program and I configured it's mode to be 'E' so when errors are present,pop up windows are shown. Unfortunately I can't seem to find the error. I will post below the code. What I did with the code was to clear the value of anep-anbtr to no value. help would really be appreciated. Thanks guys!
FORM GENERATE_BDC_DATA_ABAA.
DATA: I_ANBTR LIKE ANEP-ANBTR.
DATA: C_ANBTR(16), C_ANBTR2(16), C_DMBTR(16).
PERFORM BDC_DYNPRO USING 'SAPMA01B' '0100'.
PERFORM BDC_FIELD USING:
'BDC_OKCODE' '/00',
'ANBZ-BUKRS' 'GLOB',
'ANBZ-ANLN1' IT_REC-ANLN1,
'ANBZ-ANLN2' IT_REC-ANLN2,
'ANEK-BLDAT' IT_REC-BLDAT,
'ANEK-BUDAT' IT_REC-BUDAT,
'ANBZ-PERID' IT_REC-PERID,
'ANBZ-BWASL' IT_REC-BWASL.
PERFORM BDC_DYNPRO USING 'SAPMA01B' '0110'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '/00'.
PERFORM BDC_FIELD USING 'ANBZ-DMBTR' IT_REC-DMBTR.
PERFORM BDC_FIELD USING: 'ANBZ-BZDAT' IT_REC-BUDAT,
'ANEK-SGTXT' IT_REC-SGTXT.
"I_ANBTR = '0'. "IT_REC-DMBTR * -1.
perform bdc_dynpro using 'SAPMA01B' '0285'. " '0600'.
*AVH
clear anep-anbtr.
perform bdc_field using 'BDC_CURSOR'
'ANEP-ANBTR'.
perform bdc_field using 'BDC_OKCODE'
'=AUSF'.
*AVH
clear anep-anbtr.
PERFORM BDC_DYNPRO USING 'SAPMA01B' '0285'. " '0600'.
*AVH
clear anep-anbtr.
PERFORM BDC_FIELD USING 'BDC_CURSOR' 'ANEP-ANBTR'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '=AUSF'.
PERFORM BDC_FIELD USING 'ANEP-ANBTR' '0'.
*AVH
clear anep-anbtr.
PERFORM BDC_DYNPRO USING 'SAPMA01B' '0110'.
PERFORM BDC_FIELD USING:
'BDC_OKCODE' '=UPDA',
'ANBZ-DMBTR' IT_REC-DMBTR,
'ANBZ-BZDAT' IT_REC-BUDAT,
'ANEK-SGTXT' IT_REC-SGTXT.
PERFORM BDC_DYNPRO USING 'SAPMA01B' '0285'. " '0600'.
*AVH
clear anep-anbtr.
PERFORM BDC_FIELD USING:
'BDC_CURSOR' 'ANEP-ANBTR',
'BDC_OKCODE' '=AUSF'.
PERFORM BDC_FIELD USING 'ANEP-ANBTR' '0'.
*AVH
clear anep-anbtr.
PERFORM BDC_DYNPRO USING 'SAPMA01B' '0285'. " '0600'.
*AVH
clear anep-anbtr.
PERFORM BDC_FIELD USING:
'BDC_CURSOR' 'ANEP-ANBTR',
'BDC_OKCODE' '=AUSF'.
PERFORM BDC_FIELD USING 'ANEP-ANBTR' '0'.
*AVH
clear anep-anbtr.
PERFORM BDC_DYNPRO USING 'SAPMA01B' '0110'.
PERFORM BDC_FIELD USING:
'BDC_OKCODE' '=UPDA'.
ENDFORM. " GENERATE_BDC_DATA_ABAA
‎2006 Feb 07 3:39 AM
‎2006 Feb 07 3:34 AM
Hi,
What is the error that you get? syntax error?
Regards,
Suresh Datti
‎2006 Feb 07 6:14 AM
I just know that it has an error because the BDC 'mode' is 'E'. And yes, the program used call transaction. So when I run the program and the transaction that is being called shows up, the ok-code pop up window shows up. If you review my code, what i'm trying to do is to change the value of anep-anbtr in screen 285. Thanks a lot guys...
‎2006 Feb 07 6:22 AM
for the error messages to be displayed in call transaction,
u need to call a fn module
BAPI_MESSAGE_GETDETAIL .
or READ TABLE T100
‎2006 Feb 07 3:39 AM
Clearing ANBTR like this 'clear anep-anbtr' will not achieve any result as what you are doing here is just clearing a variable not the screen field value. For that you have to do this.
PERFORM BDC_FIELD USING 'ANEP-ANBTR' anep-anbtr.
‎2006 Feb 07 3:39 AM
‎2006 Feb 07 7:15 AM
Check Sy-subrc after CALL TRANSACTION.
If its 4 then wite the contents of BDCDATA to know what
data is causing the error.
Thanks & Regards,
Ankur
‎2006 Feb 07 7:30 AM
Hi Viray,
Try to use MESSAGE_PREPARE Function Module. It'll show the errors columnwise so based on that i hope u can rectify.
cheers & ByE......,
Suresh Kancharla