These are some of the SAP APO functional modules I have worked with. If you need any help with parameters please drop a line.
Order |
|
/SAPAPO/DM_ORDER_GET_ORDID
|
Get the 22 char GUID of planned order
|
BAPI_MOSRVAPS_CREATESNPORDER
|
Create planned order. Table parameter “mapping_data” will return the created planed order number.
|
BAPI_POSRVAPS_SAVEMULTI3
|
Create orders
|
/SAPAPO/OM_ORDER_GET_DATA
|
Get planned order details
|
/SAPAPO/CTM_LC_FIXPEG_CHANGE
|
Create fix pegging for purchase order and planed order
|
Resource |
|
OWN_LOGICAL_SYSTEM_GET
|
Get current logical system
|
BAPI_RSSRVAPS_GETLIST
|
Get resource header
|
/SAPAPO/CRES_RESOURCE_READ
|
Read Resource
|
/SAPAPO/CRES_SAVE_FROM_BT
|
Save resource set for update
|
/SAPAPO/CRES_OBJECT_UPDATE
|
Set resource for edit. Pass ‘EDITQUAN’ to “iv_object_type” to edit quantity.
|
APO Planning Object Related |
|
/SAPAPO/TS_PSTRU_SINGLE_GET
|
Get grouping conditions for planning object
|
/SAPAPO/TS_PSTRU_TAB_NAMES_GET
|
Get structure of CVC combination of planning object
|
/SAPAPO/TS_PLOB_LIST_GET
|
Get CVC combinations
|
SLS_MISC_GET_LAST_DAY_OF_MONTH
|
Get last day of the month
|
FIRST_DAY_IN_PERIOD_GET
|
Get first day in the period
|
LAST_DAY_IN_PERIOD_GET
|
Get last day of the period
|
APO Quota Management |
|
BAPI_QTASRVAPS_SAVEMULTI2
|
Modify quota arrangement
|
BAPI_QTASRVAPS_DELMULTI
|
Delete Quota arrangement
|
APO Transport Lanes |
|
BAPI_TRLSRVAPS_SAVEMULTI
|
Save transport lanes
|
BAPI_TRLSRVAPS_GETLIST
|
Get transport lane detail
|
SAP APO!
Hey, How do we get to know if there are any CVC's existing in APO system using – /SAPAPO/TS_PLOB_LIST_GET function module . Have used /SAPAPO/RELEASE_SNP_FORECAST program as reference to make understand how to use , /SAPAPO/TS_PLOB_LIST_GET function module but didn't achieve what I wanted to. Please help me with this
Hi,
There are several function modules you have to use to get the CVC combinations of a planning object. Follow the below steps.
Step 1
*Get Grouping Conditions for planning object
CALL FUNCTION '/SAPAPO/TS_PSTRU_SINGLE_GET'
EXPORTING
iv_plobid =
IMPORTING
et_tsplobpo = li_group_c
EXCEPTIONS
plobid_invalid = 1
OTHERS = 2.
Step 2
*Get internal table structure of CVC combinations of planning object
CALL FUNCTION '/SAPAPO/TS_PSTRU_TAB_NAMES_GET'
EXPORTING
iv_plobid =
IMPORTING
ev_viewm = lwa_viewm
ev_view2 = lwa_view2
EXCEPTIONS
invalid_input = 1
internal_error = 2
OTHERS = 3.
Step 3
*If you want to select CVC combination that relate to selection
CLEAR lwa_selection.
lwa_selection-iobjnm = eg: material, Customer .
lwa_selection-sign = 'I'.
lwa_selection-option = 'EQ'.
lwa_selection-low = .
APPEND lwa_selection TO li_selection.
*append grouping condition fields, This was found in the step 1
LOOP AT li_group_c INTO lwa_group_c.
APPEND lwa_group_c-iobjnm TO li_group_by.
ENDLOOP.
*Get all CVC combinations for planning object and selection in "li_selection"
CALL FUNCTION '/SAPAPO/TS_PLOB_LIST_GET'
EXPORTING
iv_bas_plobid =
it_selection = li_selection
it_group_by = li_group_by
IMPORTING
et_plobs_in_view =
EXCEPTIONS
invalid_selection = 1
no_bas_plobid = 2
inherited_error = 3
coding_generation_failed = 4
no_authorization = 5
OTHERS = 6.
Requirement is to use /SAPAPO/MC62 transaction to create the CVC. If CVC exists, then I need to populate the error log with a message stating the CVC exists for combination of – Location Number, Product value, Sales Org, Customer Grp, Distribution channel. I am asked to use /SAPAPO/TS_PLOB_LIST_GET function module to check if CVC exists for the above mentioned combination. It will be very helpful if you can provide more insights for the above mentioned requirements. As I am not able to figure out how to use /SAPAPO/TS_PLOB_LIST_GET F.M to check if CVC exists.
Check the coding in my previous comment. This is exactly how you can use this FM "SAPAPO/TS_PLOB_LIST_GET" to check if there are CVCs created. If there are CVC are created it will be returned from importing parameter "et_plobs_in_view"!
In "Step 3" you can see how to use location, Product, Sales org etc as a selection.
If we want to delete certain data in CVC's, how should I Do that in ABAP using FM or BAPI?
Is there any FM or BAPI to delete cvc'c?
Hi,
I am using the Function Module '/SAPAPO/CRES_OBJECT_UPDATE' to create new Downtime entries in APO, but it is not updating the data in to the system. I am passing the following parameters:
RESUID = /SAPAPO/RES_HEAD-RESUID.
SIMVERSID = '000'.
DOWNID = (Created using FM 'GUID_CREATE').
BEGDA = User input.
BEGTI = User Input.
ENDDA = User Input.
ENDTI = User Input.
TYPE = User Input.
UPD = 'I'.
I am locking the Resource to be updated using /SAPAPO/CRES_RES_LOCK. SY-SUBRC is always zero but the results are not updated. What am I doing wrong?
Hi,
I have a requirement to unfix keyfigures in a given period and for given characteristics , could you help me with any funtional module i can use, or any ABAP program?
I tried Function Module CALL FUNCTION '/SAPAPO/CRES_OBJECT_UPDATE' but it does not update table /SAPAPO/EDITQUAN. Is there a Function Module that will update table /SAPAPO/EDITQUAN.
Thanks
excellent post thanks for sharing from Sankar
Thanks for Information SAP APO