2013 Jul 09 11:19 AM
Hi all,
I want to create a FM for a generic datasource with tables MAST and STPO for BOM report.I have created a structure(ZMASTSTPO) with all the fields of MAST,STPO tables(included common fields from MAST table not from STPO table) and also included the reference fields from reference tables T001,RC29P,CKHS in the same structure and given the same structure name and fields as the reference fields.We also need to call standard FM CSAP_MAT_BOM_ITEM_SELECT in the FM we create.I have copied RSAX function group with the FM RSAX_BIW_GET_DATA_SIMPLE and in TABLES section i have given the structure ZMASTSTPO.I really don't know what to do with the rest of the sections like in IMPORT,EXPORT,CHANGING,SOURCECODE.I understand that i need to write SELECT statement which gets all the fields from the tables that i have given to populate the structure ZMASTSTPO.
Could you please anybody explain me how to write the code to populate the fields of the structure or could if anybody already has done the similar approach please explain me?
Thanking you,
2013 Jul 09 1:50 PM
Hi,
Refer below document which clearly explains how to extract BOM header and BOM item details into BW. You can also see page number 7 where there is logic written calling FM "CSAP_MAT_BOM_ITEM_SELECT". Hope this helps. Please close the thread if it is answered.
Srikanth.
2013 Jul 09 12:03 PM
Do a search on how to write a FM and use of import, export and table parameters
Moderator Message :Links without explanations are not permitted.
http://help.sap.com/saphelp_nw70/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm
Message was edited by: Venkat Gowrishankar
2013 Jul 09 1:50 PM
Hi,
Refer below document which clearly explains how to extract BOM header and BOM item details into BW. You can also see page number 7 where there is logic written calling FM "CSAP_MAT_BOM_ITEM_SELECT". Hope this helps. Please close the thread if it is answered.
Srikanth.
2013 Jul 09 2:44 PM
thanks Aeda and Srikanth.Srikanth i already have that document but the process they have explained is not clear and its not working.I have tried that.has anybody done this scenario if in case they were part of BW project.
Note: the table i have mentioned above CKHS..its actually STKO
2013 Jul 10 10:26 AM
Hi,
Can i know where you are struck. Have you created generic data source in RSO2 specifying the Extraction method as "Function module" , Extractor as your new Function module name, and Extract Structure with your new structure ?
How to create generic data source using FM can be found from document mentioned in below link
If you are facing trouble in creating functtion module then below link would be useful.
http://www.newtosap.info/2012/07/creating-function-module-and-using-it.html
Srikanth.
2013 Jul 16 10:44 AM
Hi Srikanth sorry for late reply.I have created FM and Extract structure and finally created Generic dataosurce.When im checking in RSA3 it is giving ERRORS OCCURRED DURING EXTRACTION..not fetching any data.Do you have any idea.I think the code is looking fine.I have checked it ,no errors find.
2013 Jul 26 5:55 PM
thanks everybody.I have copied a standard FM and used it for my scenario.Its working fine
2013 Jul 26 11:45 PM