cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

About C1F2_SUBSTANCES_READ_WITH_REF

Former Member
0 Likes
577

Hi Experts,

I have few ques as below,

1) Is  C1F2_SUBSTANCES_READ_WITH_REF FM alternative for  C1F2_SUBSTANCES_READ (As i read in one of the threads)

2) I have used  C1F2_SUBSTANCES_READ_WITH_REF FM to fetch info from property tree maintained against relationship spec as per answer in this thread -

I am getting 244 values in E_API_PROP_DATA_TAB out of which only 2 are of interest to me as seen in attachment.


Is it possible to filter only these 2 values in output rather than get all 244 values?


Also I am not interested in X_API_PROP_HEADER_TAB & X_API_PROP_TAB. Is it possible to instruct FM to skip populating these tables by giving appropriate input?


Currently I am passing inputs to FM exactly as mentioned here -


Kindly share your valuable inputs.


BR,

Aspire

Accepted Solutions (1)

Accepted Solutions (1)

Mark-Pfister
Active Contributor
0 Likes

HI Aspire,

Instead of C1F2 FM's you should use the BAPI or the FMs from the group C1F5.

For the BAPI these example reports are available that should make clear how to use the BAPI.

  • RC1_1077_BAPI_EXAMPLE_CHANGE
  • RC1_1077_BAPI_EXAMPLE_DG
  • RC1_1077_BAPI_EXAMPLE_GENERAL

Internally the BAPI's call the C1F5 FMs so you can figure out how they are working as well.

To read only a specfic Valuse Assignement Type / Property / Class with the FM C1F5_SPECIFICATIONS_READ you need to fill table I_VALUATION_HEAD_LGK_STAB with the Value Assignement Types you want to read.

Please read the FM documentation as well.

Hope this helps

Mark

Answers (2)

Answers (2)

christoph_bergemann
Active Contributor
0 Likes

Dear Aspire

regarding; is C1F2_SUBSTANCES_READ_WITH_REF FM alternative for  C1F2_SUBSTANCES_READ

answer: not always. You can define C1F2_SUBSTANCES_READ as a "subclass"  of C1F2_SUBSTANCES_READ_WITH_REF.

Regarding your demand: as more specific you "populate" the input parameterrs as less data records you may found. I can not explain you the details here. It depends on the data maintained etc.

In different thread this discussion took place:

a.) if you take closer look to function group C1F2/C1F5 the function modules there in are not released for "customer" use (but used in SAP internally)

b.) generall the use of the BAPIs (refer to answer of Mark) is an alternative; but to understand the logic to be used might not be simple. In any case: topic of API/BAPI/FM was discussed often here.  PLease check:

you will find lot of references. And it is a very good learning objective to "simply" analyse the output variants which are delivered by SAP (how the code is running). All of these output variants use one of the several FMs/APIs/BAPIs etc. (and as Mark explained. the BAPIs use as well internally the FMs

A word of warning: You must have understood completely the EHS data model (including e.g. change numbers, inheritance etc.) if you would like to use these FMs/APIs/BAPIs properly. Many "ABAPer" do have big problem inusing these FMs etc. You wil find some threads here indicating that a corresponding "report" seems to have "crashed" the EHS database (integrity) because of wrong usage.

C.B:

Former Member
0 Likes

I am getting same expected output with FMs C1F2_SUBSTANCES_READ_WITH_REF & C1F2_SUBSTANCES_READ.

--> In C1F2_SUBSTANCES_READ FM, i am passing the characteristics i am interested as input. I end up getting 244 characteristics(Field ATNAM) in output. I believe there should be a way where we can control which characteristics are displayed in output.

Please let me know.

Former Member
0 Likes

In order to avoid X_VALUATION_HEAD_TAB & X_VALUATION_INST_TAB from being populated in output, i tried passing SPACE as well as 'N' against fields VALUATION_HEAD & VALUATION_INST in input structure  I_SCENARIO. It did not help.