on 06-27-2014 5:51 AM
Hi all
How stock on hand can be updated in SNP Planning book using ABAP or functional module,this is reference to SAP APO SNP Planning Book
Regs
Poorna
Hi Poorna,
If I understand your question correctly, you want to know how the stock on hand appears in the SNP planning book?
In APO the stock and other transactional data are stored in live cache order series objects with reference to order categories. For example the stock on hand has category CC.
In the planning area configuration, you define the category groups against the key figures used. So for Stock on hand key figure you define a category group which has categories like CC and other stock categories.
The stock data under these categories is then reflected in the stock on hand key figure of planning book.
Hope this helps!
Regards,
Umesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Poorna,
First of all the stock on hand is a standard key-figure in the SNP planning book so i could not understand the logic behind reading it from APO tables and writing it into the SNP planning book. But if any such requirement is there following BAPI can be used to write the stock on hand into SNP planning book in a time series key-figure:
BAPI_PBSRVAPS_CHANGEKEYFIGVAL2 : Change Key Figure Values.
if you want to read different type of stock from the planning book as well following BAPI can be used for this purpose:
BAPI_STSRVAPS_GETLIST2 : Read Stocks for Selection Criteria
I have used both the BAPIs in my previous projects and if you want any help in this regard please let me know.
Regards,
Mukesh Pandey
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Poorna,
Try following BAPI :
"BAPI_STSRVAPS_SAVEMULTI2" "Create or Change Stocks"
psedo code is as below:
CLEAR:e_stock,
w_flag1,
w_flag2,
w_discontinue.
FREE: i_stock,
i_return.
MOVE:c_11 TO e_stock-stock_type,
<fs_pktotal_data>-ziv_dp_py TO e_stock-product,
c_x TO e_stock-delta_change_flag,
us_statp TO e_stock-atpcat,
* c_1001 TO e_stock-loctype,
* <fs_pktotal_data>-ziv_dp_ap TO e_stock-location,
us_loctype TO e_stock-loctype,
us_location TO e_stock-location,
<fs_pktotal_data>-ziv_dp_60 TO e_stock-quantity.
APPEND e_stock TO i_stock.
*End of update JM Macariola 04/17/2009
CALL FUNCTION 'BAPI_STSRVAPS_SAVEMULTI2'
EXPORTING
logical_system = va_logsys
commit_control = 'E'
* PLANNING_MODE_USAGE =
planning_version = '000'
* NO_AUTOMATIC_VERSION_CREATION =
TABLES
stock = i_stock
* CLASSVALUESCHAR =
* CLASSVALUESNUM =
* CLASSVALUESCURR =
return = i_return
* EXTENSION_IN =
* FCS_REDUCTION =
Regards,
Mukesh Pandey
User | Count |
---|---|
7 | |
4 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.