Skip to Content
author's profile photo Former Member
Former Member

Characteristic Relationship derivation issue in IF_RSPLS_CR_METHODS~DERIVE

Hi Gurus,

Here is a requirement ,

I have to Copy a characteristic value from Char 1 to Char 2.

I am able to succesfully copy that using Characteristic relationship Source and target and writing a code under "IF_RSPLS_CR_METHODS~DERIVE" .

But it working only when i copy from 0Comp_Code to 0Profit_Center.

But when i am trying to copy from ZMATERIAL TO 0STKEYFIG which is SAP defined characteristic i am having problem.

ZMATERIAL is custom defined and 0STKEYFIG is SAP defined.

under IF_RSPLS_CR_METHODS~DERIVE

Working Code

field-SYMBOLS: <l_chavl> type any. 

FIELD-SYMBOLS: <l_chavl_comp_code> TYPE ANY.
 DATA: t1 TYPE c LENGTH 10 VALUE '000000'.

ASSIGN COMPONENT 'COMP_CODE' OF STRUCTURE c_s_chas  TO <l_chavl_comp_code>.

ASSIGN COMPONENT 'PROFIT_CTR' OF STRUCTURE c_s_chas   TO <l_chavl>.
  CONCATENATE t1 <l_chavl_comp_code> into <l_chavl> .

Code which is not working

 FIELD-SYMBOLS: <l_chavl_zmaterial> TYPE ANY.
ASSIGN COMPONENT 'ZMATERIAL' OF STRUCTURE c_s_chas  TO <l_chavl_zmaterial>.

ASSIGN COMPONENT 'STKEYFIG' OF STRUCTURE c_s_chas  TO <l_chavl>. 

What i noticed here is when ever i give custome defined object which preceede with Z in ASSIGN COMPONENT syntax... it is not recognising it but is recognising in case of 0STKEYFIG.

It (ASSIGN COMPONENT ) syntax is accepting only STKEYFIG insted of 0STKEYFIG (with out '0' infront of STKEYFIG) , but it is not accepting ZMATERIAL or MATERIAL .

Can any one suggest me on how to Assign Componet syntax works when i have to assign 'Z..." infoobject.

Hope i am clear

Thanks,

Kumar

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 17, 2008 at 03:49 PM

    Try '/BIC/ZMATERIAL'.

    You can find it out by debugging the code and looking at the structure of c_s_chas.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.