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

ABAP How to get an attribute of infoobject (result Package)

Hello,

I need to retrieve an attribute of an infoobject in the RESULT_PACKAGE-MATERIAL in an ENDROUTINE.

How can i do that in ABAP.

Thanks.

Gilles F.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 29, 2011 at 09:07 AM

    Hi Gilles,

    Value of the attribute of the info object RESULT_PACKAGE-MATERIAL can be done using a lookup to the master data table.

    For material it is /BI0/PMATERIAL.

    For example if you want to retrieve the value Product (which is an attribute of Material). Follow these steps.

    /BI0/OICRM_PROD is the type of the variable Product (0CRM_PROD).

    This code will help.

    Data: lv_prdt type /BI0/OICRM_PROD. 
    Loop at Result_package into WA.
    
    select single CRM_PROD into lv_prdt from /BI0/PMATERIAL where material = WA-material.
    
    * do ur calculations here.....  lv_prdt will be having the value 0CRM_PROD, the attribute of Material 
    clear WA.
    Endloop.

    Note: The above method is only for retrieving. If you want to pass the value to the attribute of an infoobject, then the target should have that attribute as a seperate infoobject.

    Hope this helps.

    Regards,

    Guru

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 29, 2011 at 08:32 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 29, 2011 at 11:02 AM

    Hello,

    I was thinking that a more simple solution was possible like in a object language. ; but its working fine.

    Thanks you.

    Gilles F.

    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.