‎2008 Apr 09 3:54 PM
Hi experts,
I have created one RFC to retrieve the sales item data based on the sales document number from VBAK.
I am getting the syntax error : REPORT/PROGRAM statement missing in or Program Type I (INCLUDE ) while activating the Function Module.
I am really confusing bcoz i have tried by creating the other function module without writing any source code even then its giving the same error.
Here am giving the code which i have written in my function module. Could anybody look into this and give me some suggestion what would be the problem....
IMPORT
VBELN TYPE ZBAPI_IMPORT-VBELN Sales and Distribution Document Number
TABLES
IT_VBELN LIKE ZBAPI_TABLE SD Document Numbers, Not Sorted
SOURCE CODE
FUNCTION ZBAPI_SALES_ITEM_DATA.
*"----
""Local Interface:
*" IMPORTING
*" VALUE(VBELN) TYPE ZBAPI_IMPORT-VBELN
*" EXPORTING
*" VALUE(RETURN) TYPE BAPIRETURN
*" TABLES
*" IT_VBELN STRUCTURE ZBAPI_TABLE OPTIONAL
*"----
SELECT * FROM VBAP
INTO CORRESPONDING FIELDS OF IT_VBELN.
ENDSELECT.
ENDFUNCTION.
Please help me out.
Regards
Sireesha.
‎2008 Apr 09 4:42 PM
Hi Sireesha,
this is the problem with the function group.if the function group is not active then you will get this error.please follow these steps to activate the function group.
1)go to se37
2)go to menu item Goto
3)go to Function Groups->Display Group
4)enter the functiona group name and press enter
5)you will get another screen.In that click on main program.
6)you will get abap editor with the functionpool name as SAPLfunctiongroupname
7)click on Include provided for Global data.you will go to the abapeditor with that include.activate it.if you get any error click on activate any way.
8)click on include provided for function modules.you will go to the abapeditor with that include.activate it.if you get any error click on activate any way.go back.
9)click on activate in the screen that you get in step 6.
now activate the functional module.you will not get any error.in steps 7 and 8 i mentioned that click on activate any way if you get error.why because after creating function group immediately you have activate it using the above steps.but if you used the function group without activating for a functionalmodule then you will get the above said error.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Apr 9, 2008 6:05 PM
‎2008 Apr 09 4:02 PM
Hi,
Go to transaction SE80.
There you select the function group from the drop down box.
And in the below field mention the function group name which you are using and click on display button.
Now right click on the inactive objects present under the group and activate it.
Especially all the includes present under this function group should be in active mode.
<REMOVED BY MODERATOR>
regards,
Prasanna
Edited by: Alvaro Tejada Galindo on Apr 9, 2008 6:04 PM
‎2008 Apr 09 4:03 PM
Open function module in se37..now press ctrlshiftF5..check the main program ..double click on the item topmost in the heirarchy..from the dialogue box choose main program...if everything is alright ..i.e., all the includes start with statement function-pool..then simply right click on the function pool name ..topmost in heirarchy...and choose activate..
‎2008 Apr 09 4:07 PM
The problem is the Function group is inactive.
Go to transaction SE80, select the Function group from the drop down and activate. Once it is activated the problem will be resolved.
<REMOVED BY MODERATOR>
Thanks,
Imran.
Edited by: Alvaro Tejada Galindo on Apr 9, 2008 6:04 PM
‎2008 Apr 09 4:42 PM
Hi Sireesha,
this is the problem with the function group.if the function group is not active then you will get this error.please follow these steps to activate the function group.
1)go to se37
2)go to menu item Goto
3)go to Function Groups->Display Group
4)enter the functiona group name and press enter
5)you will get another screen.In that click on main program.
6)you will get abap editor with the functionpool name as SAPLfunctiongroupname
7)click on Include provided for Global data.you will go to the abapeditor with that include.activate it.if you get any error click on activate any way.
8)click on include provided for function modules.you will go to the abapeditor with that include.activate it.if you get any error click on activate any way.go back.
9)click on activate in the screen that you get in step 6.
now activate the functional module.you will not get any error.in steps 7 and 8 i mentioned that click on activate any way if you get error.why because after creating function group immediately you have activate it using the above steps.but if you used the function group without activating for a functionalmodule then you will get the above said error.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Apr 9, 2008 6:05 PM