Skip to Content
Former Member
Jul 09, 2013 at 10:19 AM

Function Module on MAST,STPO


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,