SAP /SAPAPO/DM_OBREF_ALLOC_SUCCQTY Function Module for Quantity Consumption Between Successor and Predecessor Items
/SAPAPO/DM_OBREF_ALLOC_SUCCQTY is a standard /sapapo/dm obref alloc succqty SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Quantity Consumption Between Successor and Predecessor Items processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for /sapapo/dm obref alloc succqty FM, simply by entering the name /SAPAPO/DM_OBREF_ALLOC_SUCCQTY into the relevant SAP transaction such as SE37 or SE38.
Function Group: /SAPAPO/DM_OBREF
Program Name: /SAPAPO/SAPLDM_OBREF
Main Program: /SAPAPO/SAPLDM_OBREF
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function /SAPAPO/DM_OBREF_ALLOC_SUCCQTY pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION '/SAPAPO/DM_OBREF_ALLOC_SUCCQTY'"Quantity Consumption Between Successor and Predecessor Items.
EXPORTING
* IV_FUNKT = "Function to be Carried Out
* IV_POSTO = "ATP: Item Guid
* IV_POSFR = "ATP: Item Guid
* IV_OBREF_TYP = "Type of object reference
* IV_RFMNG = "Object Reference: Reference Quantity
* IV_MEINS = "Base Unit of Measure
* IT_SUCC_SCHEDLINES = "Table with Schedule Lines of a Successor Document
CHANGING
* CT_PRED_SCHEDLINES = "Table with Schedule Lines of a Predecessor Document
EXCEPTIONS
SCHEDULE_LINE_NOT_FOUND = 1
IMPORTING Parameters details for /SAPAPO/DM_OBREF_ALLOC_SUCCQTY
IV_FUNKT - Function to be Carried Out
Data type: /SAPAPO/FUNKTOptional: Yes
Call by Reference: Yes
IV_POSTO - ATP: Item Guid
Data type: /SAPAPO/POSGUIDOptional: Yes
Call by Reference: Yes
IV_POSFR - ATP: Item Guid
Data type: /SAPAPO/POSGUIDOptional: Yes
Call by Reference: Yes
IV_OBREF_TYP - Type of object reference
Data type: /SAPAPO/OBREF_TYPOptional: Yes
Call by Reference: Yes
IV_RFMNG - Object Reference: Reference Quantity
Data type: /SAPAPO/RFMNGOptional: Yes
Call by Reference: Yes
IV_MEINS - Base Unit of Measure
Data type: /SAPAPO/MEINSOptional: Yes
Call by Reference: Yes
IT_SUCC_SCHEDLINES - Table with Schedule Lines of a Successor Document
Data type: /SAPAPO/TBL_SUCC_SCHEDLINEOptional: Yes
Call by Reference: Yes
CHANGING Parameters details for /SAPAPO/DM_OBREF_ALLOC_SUCCQTY
CT_PRED_SCHEDLINES - Table with Schedule Lines of a Predecessor Document
Data type: /SAPAPO/TBL_PRED_SCHEDLINEOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
SCHEDULE_LINE_NOT_FOUND - No Predecessor Schedule Line Could Be Found for a Successor Schedule Line
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for /SAPAPO/DM_OBREF_ALLOC_SUCCQTY Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_iv_funkt | TYPE /SAPAPO/FUNKT, " | |||
| lv_ct_pred_schedlines | TYPE /SAPAPO/TBL_PRED_SCHEDLINE, " | |||
| lv_schedule_line_not_found | TYPE /SAPAPO/TBL_PRED_SCHEDLINE, " | |||
| lv_iv_posto | TYPE /SAPAPO/POSGUID, " | |||
| lv_iv_posfr | TYPE /SAPAPO/POSGUID, " | |||
| lv_iv_obref_typ | TYPE /SAPAPO/OBREF_TYP, " | |||
| lv_iv_rfmng | TYPE /SAPAPO/RFMNG, " | |||
| lv_iv_meins | TYPE /SAPAPO/MEINS, " | |||
| lv_it_succ_schedlines | TYPE /SAPAPO/TBL_SUCC_SCHEDLINE. " |
|   CALL FUNCTION '/SAPAPO/DM_OBREF_ALLOC_SUCCQTY' "Quantity Consumption Between Successor and Predecessor Items |
| EXPORTING | ||
| IV_FUNKT | = lv_iv_funkt | |
| IV_POSTO | = lv_iv_posto | |
| IV_POSFR | = lv_iv_posfr | |
| IV_OBREF_TYP | = lv_iv_obref_typ | |
| IV_RFMNG | = lv_iv_rfmng | |
| IV_MEINS | = lv_iv_meins | |
| IT_SUCC_SCHEDLINES | = lv_it_succ_schedlines | |
| CHANGING | ||
| CT_PRED_SCHEDLINES | = lv_ct_pred_schedlines | |
| EXCEPTIONS | ||
| SCHEDULE_LINE_NOT_FOUND = 1 | ||
| . " /SAPAPO/DM_OBREF_ALLOC_SUCCQTY | ||
ABAP code using 7.40 inline data declarations to call FM /SAPAPO/DM_OBREF_ALLOC_SUCCQTY
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.Search for further information about these or an SAP related objects