cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI for writing in DP planning Area

Former Member
0 Kudos

Hi All,

We have a requirement in which it is needed to upload the forecast from a database table into Consolidated Planning area (DP Planning Area).

Reason for that Planning area: Forecast data for few locations are planned in more than one (different) hubs. Hence the forecast need to be added (clubbed) to ensure that it does not get overwritten when it is uploaded to SNP PLANNING AREA. (You must be knowing that in SNP there is nothing like HUB , only location and product are identified in SNP master data).

Could you please suggest me a BAPI which writes 'order key figures' in a planning area.

Inputs to the BAPI will be 1. product, 2. location, 3. quantity, 4. unit of measure, 5. planning area (this will be planning area of demand planning)

A similar BAPI which uploads forecast into SNP planning area is 'BAPI_PIRSRVAPS_SAVEMULTI'.

A similar BAPI needs to be found out.

Thanks to all in advance.

Best Regards,

Chandan Dubey

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can use "BAPI_PBSRVAPS_CHANGEKEYFIGVAL". You need to create a Planning book/dataview (with say _ADMIN) and use it in the program which calls

BAPI_PBSRVAPS_CHANGEKEYFIGVAL.

For extraction of the data from DP, you can use "BAPI_PBSRVAPS_GETDETAIL" or Function module /SAPAPO/TS_DM_EXTRACT_DATA.

/Shibu

Thanks for rewarding points if this is helpful.

Former Member
0 Kudos

Hi,

We are currently testing BAPI_PBSRVAPS_CHANGEKEYFIGVAL but even when the selected Key Figure is changed after testing the function there is no change in others related to macros.

Notes for PlanningBookAPS.ChangeKeyfigureValue:

The macros for the planning book and the macros for the data view are executed by default.

For SNP planning books, you should note that only the 9APPROD, SHIP and 9ADFCST indicators can be changed.

Note that a "commit work" or "rollback work" is automatically carried out when the method is executed.

Regarding the post from Shibu, I don't consider neccesary to put "_ADMIN" in planning book name, do I?

Answers (2)

Answers (2)

somnath_manna
Active Contributor
0 Kudos

Hi Chandan,

If I understand correctly - you have data to be loaded to Time-series keyfigure in a DP Planning Area. Hence you are not technically using an Order-serie keyfigure.

If that is the case then you can check BAPI_PBSRVAPS_CHANGEKEYFIGVAL2 can be used.

Alternatively you can use a APO Infocube to stage the data from your database table and then load it to the Planning Area using transaction /SAPAPO/TSCUBE.

Thanks,

Somnath

Former Member
0 Kudos

Hi Somnath,

You are correct probably.I will be writing time series key figure.But please let me confirm that.But the BAPI BAPI_PBSRVAPS_CHANGEKEYFIGVAL2 does not exists in APO system ...instead BAPI_PBSRVAPS_CHANGEKEYFIGVAL exists...

I will explain my exact requirement...I need to take data from a data base table that i created...

Means i will be having Product, location, forecast quantity, UOM...i would not be having planning book or data view with me....

And the purpose of loding data in the data base table and from there to the planniing area is that we can remove BW interfacing...

I think with this clear picture you can provide me something to me...

Anyways thanks a lot for taking time for my qury...

looking forward to your reply..

thanks a lot,

Chandan Dubey

Former Member
0 Kudos

Hello Chendan,

Suggestion:

I think you have forecast data in a Database table by materail/location/uom...

May be you can load into a cube and link that cube to a KY in SAP planning area.

Hope this KY will load into PA.

Sreeram

Former Member
0 Kudos

HI Chandan,

check these,,

'BAPI_LOCSRVAPS_SAVEMULTI2'

'BAPI_PRDSRVAPS_SAVEMULTI2'

Former Member
0 Kudos

Hi,

Thanks for your valuable time...but i need to write the forecast in the planning area...what you have provided me is to create location and product...

anyways could you please try looking into this and find something...

thanks a lot

Chandan Dubey