2014 Oct 27 10:37 AM
Dear Experts,
I'm new to abap .Request all your help in solving for material extension for different plant and different storage location by using Bapi 'BAPI_MATERIAL_SAVEDATA'.
Requirement : Upload program needs to be created for material extension by uploading excel file . Request to share the correct coding.
Coding i was trying to do is as below and while checking i got the errror : " Statement is not accessible"
REPORT ZPP_MAT_EXT.
tables : BAPIMATHEAD.
data : BEGIN OF itab occurs 0,
...
PARAMETERS: p_file type RLGRAP-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
perform get_f4_help.
START-OF-SELECTION.
perform upload_file.
perform call_bapi.
FORM GET_F4_HELP .
...
ENDFORM. " GET_F4_HELP
data : v_file type string.
MOVE p_file TO v_file.
CALL FUNCTION 'GUI_UPLOAD' -----> Error : " " Statement is not accessible"
EXPORTING
FILENAME = p_file
...
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 2.
* IMPORTING
* RETURN =
Message was edited by: Matthew Billingham - to make it pretty obvious what the error is
Dear Experts,
I'm new to abap .Request all your help in solving for material extension for different plant and different storage location by using Bapi 'BAPI_MATERIAL_SAVEDATA'.
Requirement : Upload program needs to be created for material extension by uploading excel file . Request to share the correct coding.
Coding i was trying to do is as below and while checking i got the errror : " Statement is not accessible"
REPORT ZPP_MAT_EXT.
tables : BAPIMATHEAD.
data : BEGIN OF itab occurs 0,
...
PARAMETERS: p_file type RLGRAP-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
perform get_f4_help.
START-OF-SELECTION.
perform upload_file.
perform call_bapi.
FORM GET_F4_HELP .
...
ENDFORM. " GET_F4_HELP
data : v_file type string.
MOVE p_file TO v_file.
CALL FUNCTION 'GUI_UPLOAD' -----> Error : " " Statement is not accessible"
EXPORTING
FILENAME = p_file
...
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 2.
* IMPORTING
* RETURN =
Message was edited by: Matthew Billingham - to make it pretty obvious what the error is
2014 Oct 27 10:53 AM
Hi,
your BAPI call is not inside a routine (FORM / ENDFORM)
regards
Fred
2014 Oct 27 11:05 AM
Dear Fred,
After calling bapi inside the routine also the same error is displaying.
Best rgds/thnks,
Srikanth.
2014 Oct 27 11:09 AM
2014 Oct 27 11:21 AM
yes i've put bapi commit also. Request to share the coding for the material master extension through BAPI , if any..
Best rgds/thnks,
Srikanth.
2014 Oct 27 11:25 AM
Hi Srikanth,
Please Check the attachment and execute the code .
Regards,
Pavan
2014 Oct 27 11:38 AM
Dear Pavan,
Thanks for sharing the code. Will try and revert.
Best rgds/thnks,
Srikanth.
2014 Oct 27 11:52 AM
I've edited your post to make it clear what the issue is. You have ABAP code after the FORM... ENDFORM. It will never be run.
Since this is so darned obvious, I've marked your question as a discussion.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |