cancel
Showing results for 
Search instead for 
Did you mean: 

Solution Required imm ---- Problem loading data - Prod issue.

Former Member
0 Kudos

Hi all,

I am reading the planning book for the key figure

Selection - 0PLANT

Group by - 0BASIC_MATL

using the FM - BAPI_PBSRVAPS_GETDETAIL2

Then we have custom table for 26 weeks plan .

then calucating data and again loading the data in to planning book for the same key figure .

But when it is loading data to key figure - 0BASIC_MATL - Product Family - ( not correct data.)

suppose - RB16 total qty - 3000.

But it is spliting the Qty to 2 plants which i didn't specify in selection . I have passed only 1500 plant

in my CVC maintained product family for 2 plants .

it is working for CVC having only one plant .

But if I have a multiple plants for same CVC it is not working . Spliting data to 2 plants like 1500 each .

Please help me to resolve this issue .pls

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hey buddy,

Sudhakara, are you mapping the correct BASIC_MATL / PLANT combination from the 26 week schedule to the CVC? It sounds as if you are only mapping at the BASIC_MATL level and thus disaggregrating to the 2 CVC's.

Scott

Former Member
0 Kudos

Scott ,

Thanks for your reply , Reading the planning book only 1500 plant and mapping with plant and basic material .

But when i loading Qty is spliting to 2 plants.

Thanks

Sudhakara

Former Member
0 Kudos

Sudhakara,

I assume you are using BAPI_PBSRVAPS_CHANGEKEYFIGVAL2 to upload data back into the planning book. If you are giving the correct characteristics there, it should work.

Can you provide the data for this CHARACTERISTICS_COMBINATION internal table you are feeding to BAPI_PBSRVAPS_CHANGEKEYFIGVAL2 so that we can try and assist you better.

Thanks

Mani

Former Member
0 Kudos

Thanks for your reply .

Please find the below all internal tables.

CALL FUNCTION 'BAPI_PBSRVAPS_CHANGEKEYFIGVAL2'

EXPORTING

planningbook = v_planningbook

data_view = v_data_view

planning_version = p_versio

TABLES

key_figure = t_key_change

key_figure_value = t_key_fig_change

characteristics_combination = t_char_change

return = t_return.

T_KEY_CHANGE

1 3 6 ZCAP_RES Cap aci

2 4 8 ZCAP_RES Cap aci

3 5 28 ZCAP_RES Cap aci

4 6 29 ZCAP_RES Cap aci

5 9 43 ZCAP_RES Cap aci

6 15 49 ZCAP_RES Cap aci

7 45 27 ZCAP_RES Cap aci

8 50 7 ZCAP_RES Cap aci

9 57 3 ZCAP_RES Cap aci

T_KEY_FIG_CHANGE

1 3 20100308000000 20100314235959 3.0000000000000000E+03

2 4 20100308000000 20100314235959 1.2500000000000000E+02

3 5 20100308000000 20100314235959 1.5000000000000000E+02

4 6 20100308000000 20100314235959 2.0000000000000000E+02

5 9 20100308000000 20100314235959 3.0000000000000000E+02

6 15 20100308000000 20100314235959 1.5000000000000000E+02

7 45 20100308000000 20100314235959 1.2500000000000000E+02

8 50 20100308000000 20100314235959 2.0000000000000000E+02

9 57 20100308000000 20100314235959 2.0000000000000000E+03

T_CHAR_CHANGE

1 3 0BASIC_MATL 150150

2 6 0BASIC_MATL 200200

3 7 0BASIC_MATL 250250

4 8 0BASIC_MATL 300200

5 27 0BASIC_MATL F015

6 28 0BASIC_MATL F02

7 29 0BASIC_MATL F025

8 43 0BASIC_MATL RB16

9 49 0BASIC_MATL RB36

My CVC Original CVC --- But my selection is only for plant 1500 ,it is spliting qty to 2 plants .

ZSC_PAO_FAMY 150150 1300 &&&& A150150 US AL 1100

ZSC_PAO_FAMY 150150 1500 &&&& A150150 US SC 1100

ZSC_PAO_FAMY 200200 1300 1100 A200200 US AL 1100

ZSC_PAO_FAMY 200200 1500 &&&& A200200 US SC 1100

ZSC_PAO_FAMY 250250 1500 &&&& A250250 US SC 1100

ZSC_PAO_FAMY 300200 1500 &&&& A300200 US SC 1100

ZSC_PAO_FAMY F015 1500 &&&& F015 US SC 1100

ZSC_PAO_FAMY F02 1500 &&&& F02 US SC 1100

ZSC_PAO_FAMY F025 1500 &&&& F025 US SC 1100

ZSC_PAO_FAMY RB16 1500 1100 RB16 US SC 1100

ZSC_PAO_FAMY RB36 1500 1100 RB36 US SC 1100

Please guide me if i am doing any mistake.

Former Member
0 Kudos

Sudhakara,

Pls note that Changekeyfigval2 does not have a separate selection criteria like Getdetail2 BAPI.

In this case the selection is determined by the entry in T_CHAR_CHANGE.

So let us take the example of

3 0BASIC_MATL 150150

Here are you are assigning 150150 as your 0BASIC_MATL but if you notice there is no entry for 0LOCATION. So if there is only one location for product 150150 then all of your quantity will be under this location. However in cases where you have more than 1 location the quantity will be split between them.

To solve this in this table you need to add entries for 0LOCATION as well. so it will look something like this for Location 1500

3 0BASIC_MATL 150150

3 0LOCATION 1500

This should solve the problem.

Thanks

Mani

Former Member
0 Kudos

Thanks for your reply i will try tomorrow and let you know.

Answers (0)