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

INTERN_MATLO instead of 9ALOCNO

Hello,

I am using the BAPI - BAPI_PBSRVAPS_GETDETAIL2 to fetch keyfigure details for a SNP planning book .

And i am passing the following paramters.

PLANNINGBOOK = 9ACTM02

DATA_VIEW = CTM02(1)

PERIOD_TYPE = 'A'

DATE_FROM = 20131128

DATE_TO = 20131129

SELECTION = 9AMATNR I EQ 123456

9ALOCNO I EQ 1000

GROUP_BY = 9AMATNR

When i ran the BAPI, i get two entries in CHARACTERISTICS_COMBINATION table like below..

CHAR_COMB_ID CHARACTERISTIC_NAME CHARACTERISTIC_VALUE


1 |9AMATNR |123456

1 |INTERN_MATLO |

I have two questions on the above result i received.

1. for location, i was expecting the CHARACTERIC_NAME as 9ALOCNO instead of INTERN_MATLO. Why am i getting 'INTERN_MATLO' ?

2 . And for the location i was expecting value as 1000. But it has a blank value.

Would appriciate if you could help passing the correct parameters to get the desired result here.

Please note, when i run this BAPI for a DP planning book i get expected result in CHARACTERISTICS_COMBINATION table

as below..

1 9AMATNR 123456

1 9ALOCNO 1000.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Dec 29, 2013 at 06:42 AM

    Key figures in SNP planning book are assigned to certain aggregates. Only when you execute the BAPI on a certain assigned aggregate, could a key figure's value be read by the BAPI. Most key figures are assigned to aggregate 9AMALO, but there's no aggregate 9AMA. So you need to specify the grouping condition as 9AMATNR and 9ALOCNO, instead of just 9AMATNR.

    As you can see, when you select only 9AMATNR as grouping condition, not internal planning object is returned.

    As I always suggested, understanding SNP aggregates is necessary to understand SNP. Please also refer to note 1331576, which is a very useful note to understand SNP master data,

    Add a comment
    10|10000 characters needed characters exceeded

    • This is strange. Can you please upload the input parameters you're using?

      If you put:

      SELECTION = 9AMATNR i EQ 123456

      9ALOCNO i EQ 1000

      GROUP_BY = 9AMATNR

      9ALOCNO

      You should get the result in CHARACTERISTICS_COMBINATION as:

      CHAR_COMB_ CHARACTERISTIC_NAME CHARACTERISTIC_VALUE CHARACTERISTIC_TEXT

      1 9AMATNR 123456 APO Location
      1 9ALOCNO 1000 APO Product
      1 INTERN_MATLO 123456/1000

  • Posted on Dec 29, 2013 at 12:30 AM

    Hello Ramso


    Please see below code. This may give you some hint. This is working code to read data from SNP Planning Area. May be you need to add Planning Version.

    Call Function module ‘BAPI_PBSRVAPS_GETDETAIL2’ exporting

    GV_PLANNING_BOOK to PLANNINGBOOK,

    GV_DATA_VIEW to DATA_VIEW,

    GV_PLANNING_VERS to PLANNING_VERSION,

    GV_SELECTION_ID to SELECTION_ID,

    GW_READ_OPT to READ_OPTIONS,

    GV_DATE_FROM to DATE_FROM,

    GV_DATE_TO to DATE_TO,

    importing GV_NO_CVC from NUMBER_OF_CHAR_COMBS,

    tables GT_GROUP_BY to GROUP_BY,

    GT_KEY_FIG_SEL to KEY_FIGURE_SELECTION,

    GT_KEY_FIG to KEY_FIGURE,

    GT_KEY_FIG_VAL to KEY_FIGURE_VALUE,

    GT_CVC to CHARACTERISTICS_COMBINATION,

    GT_RETURN to RETURN.

    Also sharing with you a useful link to wiki page. This wiki page has a list of Useful BAPIs, User-exits, BADIs, Function Modules etc from APO and also contains link to various child pages on APO technical. You may want to refer this if not done already. Below link has details of this functional module as well.

    APO-Technical - Supply Chain Management (SCM) - SCN Wiki

    Hope this will help.

    Thank you

    Satish Waghmare

    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.