/SAPAPO/FOT_GET_ORDER - FOT - Get existing order data

CL_GUI_FRONTEND_SERVICES - Frontend Services   BAL Application Log Documentation  
This documentation is copyright by SAP AG.

Functionality

Function /SAPAPO/FOT_GET_ORDER long text

This function reads a three-level nested table in the format of /SAPAPO/FOT_ORD_NESTED_TAB with orderdata, verifies the data, fills order data (first level), RP (reporting point) data (second level), andits associated goods movements and activities data (third level). It calls function /SAPAPO/FOT_READ_FOTMOD to decide whether the system is R/3 dependent. Then it loops through the table and: :

-,,Checks that the order status ORD_STATUS is either original (= 01) or new created (= 05) for further process,

-,,Checks that the order ID exists and collects order ID.

-,,Calls function /SAPAPO/RRP_LC_ORDER_GET_DATA to get tables LS_ORDKEY, LS_ORDER, LS_SUPPLY, LT_ACTIES, and LT_OUTPUTS.

-,,Checks the following conditions:

o When it is original status, is order released (RELEASED = #X#)

o,,Order is a planned order (ORDTYPE = #1F# or #20# in hex)

o,,Order is an iPPE order (TRPID_TYPE = 003)

-,,Gets value for fields TCCTMS, APPLICATION, FIRMED, DIALOG.

-,,Gets value of fields PCMID, PCM_POS, PRIORITY, CREATION_TIME, EXPLOSION_DATE, and RQMTTI (requirement time) from LS_ORDER.

-,,Gets ACTIVE_MODE, SOURCE, CONFIGURATION, QUANT, TOTQUANT, SCRAP, CATEGORY_OUTPUT, CATEGORY_INPUT from LS_SUPPLY.

-,,Reads table LT_OUTPUTS with order ID equals that of LT_ORDKEYS and gets value of PEGID, OUTCAT, POSITION_NO, LINE_NO, QUANT.

-,,Reads table LT_ACTIES with order ID and ACTID equals that of LT_ORDKEYS and gets value of structure MPSCHED. Moves data of MPSCHED to those of ACTIVE_MODE.

-,,Calls function /SAPAPO/DM_PEGID_GET_MATERIAL with peg ID and gets value of fields WHATBOM, MATNR, MATID, LOCNO, LOCID.

-,,Checks authorization of location and material combination for creation access by calling function /SAPAPO/RRP_AUTH_CHECK_MATLOC.

-,,Calls function /SAPAPO/PPC_GET_ORDER_RPTID_IN to get RP data and put them in table LT_RPTID_QUNT_INF.

-,,For existing order (status = 01), calls function /SAPAPO/PPC_CONF_DI_DETAIL_GET to get movements and activities data of the order on R/3. The importing table is LT_ORDER_DETAILS.

-,,Loops at table LT_RPTID_QUANT_INF to

o,,Check authorization of location and RP name combination for creation access by calling function /SAPAPO/PPC_AUTHORITY_CHECK.

o,,Get data for fields RPTID, RPNAME, RPYIELD, RPSCRAP, RPUNIT, RPACTIVE, RPLEVEL, and BASEUNIT.

o,,For existing order (status = 01), loops at table LT_ORDER_DETAILS to get the goods movements andactivities data from R/3. Within table LT_ORDER_DETAILS, there are two table structures GMPOS_TAB, the goods movements table, and GMACT_TAB, the activities table.

o,,Loops at table GMPOS_TAB

§,,Checks the value of fields GMSYNC and GMASYN of table /SAPAPO/PPC_HDR by confirmation ID. At least one of these two fields has to be blank.

§,,Adds the record to GM_TAB of RP_TAB.

o,,Loops at table GMACT_TAB

§,, Adds the record to ACT_TAB of RP_TAB.

-,,Updates the status of table ORD_STATUS during above steps.

Example

Notes

It processes only orders with status of original (01) and new created (05).

Further information


Parameters

CT_ORD_NESTED_TAB
CT_ORD_STATUS
IT_RP_MAP_INT
IV_SIMSESSION

Exceptions

AUTH_CHECK_LOCRP_FAILED
AUTH_CHECK_MATLOC_FAILED
CONF_NOT_FOUND
EXTID_NOT_FOUND
MATERIAL_NOT_FOUND
ORDER_NOT_FOUND
ORDER_NOT_IPPE
ORDER_NOT_PLANNED
ORDER_NOT_RELEASED
PARALLEL_NOT_ALLOWED
RP_NOT_FOUND
SOURCE_NOT_FOUND

Function Group

APO/SAPLFOT_READING

BAL Application Log Documentation   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.


Length: 3842 Date: 20120525 Time: 023934     triton ( 156 ms )