2010 Feb 04 3:36 AM
Hi experts,
I am using this standard BAPI but it won't work and show a error .
ERROR -: ''=.." expected after "if".
plz solve my problem
REGARDS,
skmohanty.
&----
*& Report ZDEMO_BAPI_SALESGETSTATUS *
*& *
&----
*& *
*& *
&----
REPORT ZDEMO_BAPI_SALESGETSTATUS .
PARAMETERS : P_SDOCNO TYPE VBAK-VBELN.
DATA : WA_RETURN TYPE BAPIRETURN,
IT_STATUS TYPE TABLE OF BAPISDSTAT,
WA_STATUS TYPE BAPISDSTAT.
CALL FUNCTION 'BAPI_SALESORDER_GETSTATUS'
EXPORTING
SALESDOCUMENT = P_SDOCNO
IMPORTING
RETURN = WA_RETURN
TABLES
STATUSINFO = IT_STATUS
IF WA_RETURN IS INITIAL.
LOOP AT IT_STATUS INTO WA_STATUS.
WRITE :/5 WA_STATUS-DOC_NUMBER, WA_STATUS-DOC_DATE, WA_STATUS-PURCH_NO, WA_STATUS-PRC_STAT_H, WA_STATUS-DLV_STAT_H.
ENDLOOP.
ELSE
WRITE :/5 WA_RETURN-TYPE, WA_RETURN-CODE, WA_RETURN-MESSAGE.
ENDIF. .
2010 Feb 04 3:46 AM
Hi,
please check your program carefully. Your program is missing two ".". Every ABAP statement has to end with ".". In your case check statement CALL FUNCTION and ELSE.
Cheers
Hi,
In you code the DOT(.) is missing after the function call so insert the '.'after the call function.
REPORT ZDEMO_BAPI_SALESGETSTATUS .
PARAMETERS : P_SDOCNO TYPE VBAK-VBELN.
DATA : WA_RETURN TYPE BAPIRETURN,
IT_STATUS TYPE TABLE OF BAPISDSTAT,
WA_STATUS TYPE BAPISDSTAT.
CALL FUNCTION 'BAPI_SALESORDER_GETSTATUS'
EXPORTING
SALESDOCUMENT = P_SDOCNO
IMPORTING
RETURN = WA_RETURN
TABLES
STATUSINFO = IT_STATUS
Insert DOT here.
IF WA_RETURN IS INITIAL.
LOOP AT IT_STATUS INTO WA_STATUS.
WRITE :/5 WA_STATUS-DOC_NUMBER, WA_STATUS-DOC_DATE, WA_STATUS-PURCH_NO, WA_STATUS-PRC_STAT_H, WA_STATUS-DLV_STAT_H.
ENDLOOP.
after ELSE also put the dot
ELSE
WRITE :/5 WA_RETURN-TYPE, WA_RETURN-CODE, WA_RETURN-MESSAGE.
ENDIF. .
2010 Feb 04 3:46 AM
Hi,
please check your program carefully. Your program is missing two ".". Every ABAP statement has to end with ".". In your case check statement CALL FUNCTION and ELSE.
Cheers
2010 Feb 04 3:50 AM
Hi,
In you code the DOT(.) is missing after the function call so insert the '.'after the call function.
REPORT ZDEMO_BAPI_SALESGETSTATUS .
PARAMETERS : P_SDOCNO TYPE VBAK-VBELN.
DATA : WA_RETURN TYPE BAPIRETURN,
IT_STATUS TYPE TABLE OF BAPISDSTAT,
WA_STATUS TYPE BAPISDSTAT.
CALL FUNCTION 'BAPI_SALESORDER_GETSTATUS'
EXPORTING
SALESDOCUMENT = P_SDOCNO
IMPORTING
RETURN = WA_RETURN
TABLES
STATUSINFO = IT_STATUS
Insert DOT here.
IF WA_RETURN IS INITIAL.
LOOP AT IT_STATUS INTO WA_STATUS.
WRITE :/5 WA_STATUS-DOC_NUMBER, WA_STATUS-DOC_DATE, WA_STATUS-PURCH_NO, WA_STATUS-PRC_STAT_H, WA_STATUS-DLV_STAT_H.
ENDLOOP.
after ELSE also put the dot
ELSE
WRITE :/5 WA_RETURN-TYPE, WA_RETURN-CODE, WA_RETURN-MESSAGE.
ENDIF. .
2010 Feb 05 3:45 AM
Hi all,
still it won't work and show same error.
Plz solve it bcoz i am new in ABAP.
Regards,
skmohanty.
2010 Feb 05 4:31 AM
>
> Hi Mohanty,
> Your code is working fine , only error is you hav not kept the periods .
> correctly , which has been clearly indicated in the previous posts.
> i have corrected your code and pasted it here you can try now
> Regards,
> .
>
PARAMETERS : P_SDOCNO TYPE VBAK-VBELN.
DATA : WA_RETURN TYPE BAPIRETURN,
IT_STATUS TYPE TABLE OF BAPISDSTAT,
WA_STATUS TYPE BAPISDSTAT.
CALL FUNCTION 'BAPI_SALESORDER_GETSTATUS'
EXPORTING
SALESDOCUMENT = P_SDOCNO
IMPORTING
RETURN = WA_RETURN
TABLES
STATUSINFO = IT_STATUS.
IF WA_RETURN IS INITIAL.
LOOP AT IT_STATUS INTO WA_STATUS.
WRITE :/5 WA_STATUS-DOC_NUMBER, WA_STATUS-DOC_DATE, WA_STATUS-PURCH_NO, WA_STATUS-PRC_STAT_H, WA_STATUS-DLV_STAT_H.
ENDLOOP.
ELSE.
WRITE :/5 WA_RETURN-TYPE, WA_RETURN-CODE, WA_RETURN-MESSAGE.
ENDIF.
>
Edited by: gurunath pandiyarajan on Feb 5, 2010 5:31 AM
2010 Feb 05 12:53 PM
2010 Feb 05 12:54 PM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |