Sei sulla pagina 1di 10

1.

Dependencies

Make sure to have the purchase order (destination to SAP), and Inbound Order to be inserted.
Make sure to have the proper information to be included for the inbound information in order to link.
(Insert the Inbound order based from the Shipping Record which came from the Supplier)
Make sure to register the necessary code conversion value to the code conversion table.
2
2.1

Process
Process Description

0.1 Goods Movement Document EntryMIGO Exit Addtion


When entering the goods receipt, the attributes for the goods receipt materials has to be changed from
Finished Goods to Raw Material and the Excise Action has to be changed to Only Part1. This will be
accomplished using an enhancement implemention.
When entering the goods receipt using the function module, the Part1 Register needs to be updated.
1) When entering the goods receipt transaction, the attributes of the goods receipt material has to changed
from Finished Goods to Raw Material.
2) The Excise Action within the goods document header has to be changed from 01 (Capture & Post Excise
Invoice) to 05 (Only Part 1).
The following logic has to be processed
Obtain from the parameter table which plant is to be processed by the enhancement implementation
(Multiple Entries
Search Condition
Parameter TableFUNC_AREAMM
Parameter TablePROJAS
Parameter TableLOCATG1
Parameter TableLEG_SYS3PL
Parameter TableFUN_ID0520102
Parameter TableCONV_OBPLANT
Goods Movement Line Item Change Conditions
Condition 1 When the goods movement line item plant is the same as the plant obtained from the
parameter table.
Condition 2 When the [Item OK] flag is set
Condition 3 When the transaction type for goods movement document is other than Display and
Cancel.
The following process needs to be executed
The CAPIND(Material attributes) and ORIG_CAPIND(Material attributes) of the internal table
Incoming Excise Invoice has to be set to blank(Raw Materials).
Goods Movement Header Change condition
Condition 1 When the Excise Invoice Header internal table plant is the same as the plant obtained
from the parameter table.
Condition 2 When the goods movement transaction type is goods receipt (Mvt Type:105) and the
Plant Flag is on and when in the posting mode.
Condition 3 When the goods movement transaction type is not Others
The following process needs to be executed
Set the Excise Action of the Excise Invoice Header Internal Table to 05(Only Part 1)
Goods movement screen refresh
Condition 1If the plant in the Excise Invoice Header is the same as the plant obtained from the
parameter table
0.2 Goods Movement Document EntryFunction ModuleGoods Movement Exit Addtion
Upon entering the inbound goods receipt, planned delivery costs for CVD Clearing Accounts need to be set to
zero. The following procedure needs to be executed.

1) If the movement type of the goods receipit item and the plant is the same as the values in the parameter table,
the following procedure is executed.
2) Obtain the tax calculation prcedure from the company code.
3) Using the tax calculation procedure, the the planned delivery cost condition type is the same as tax
calculation procedure CVD Condition Type A/P or ECS Condition Type A/P Imports or ADC Condition Type
A/P, the planned condition cost (KWERT, KWRFW) needs to be set to zero
4) If the planned delivery condition type is J1CV, the planned delivery cost (KWERT, KWRFW) needs to be set
to zero
1. Inbound Process: Extract target data from the Add-On Table (Purchase Order/Stock
Transfer)
Extract the following data:
Item F/#=11
DATA Segment=A10A20U10U20V10N30
Add-On Table: Status(D or C)
(When Status=E (Error), then set as re-processing item)
Add-On Table: Status = Value fetched from the Screen
1.1 Order Existence Check

Add-On Table: Purchase Number=EKKO: EBELN

Add-On Table: Purchase Item Number=EKPO: EBELP

Add-On Table: Issue No.=EKPO: BEDNR

Add-On Table: Issue No.Add-On Table: Deletion Flag: X


OK
Go to 1.2
NG
Go to 5 error process
1.2 Inbound Check for corresponding Order Number
Add-On Table: Purchase Number=EKKO: EBELN
Add-On Table: Purchase Item Number=EKPO: EBELP
Delivery Completion Segment (EKPO: ELIKZ)X
OK
Go to 1.3
NG
Go to 5 error process
1.3 Existence Check for Inbound Order
Add-On Table: Purchase Number=EKES: BSART
Add-On Table: Purchase Item Number=EKES: EBELP
Inbound Order Number (EKES: VBELNBLANK
Inbound Order Item (EKES: VBELP)BLANK
OK
Go to 1.4
NG
Go to 5 error process
1.4 Quantity Check
CASE For all items except EKKO: BSART=UBZUB
Add-On Table: Inbound Quantity > Purchase Quantity EKPO:MENGE- (Move Type
(EKBE: BWART) = Inbound Quantity for 103, 104 (EKBEWESBS))
NG
Go to 5 errror process
Add-On Table: Inbound Quantity <= Purchase Quantity EKPO:MENGE- (Move Type
(EKBE: BWART) = Inbound Quantity for 103, 104(EKBEWESBS))
OK
Go to 1.5
1.5 Inbound Process Execute
If all process from 1.5.1 to 1.5.4 is NOT finished successfully, then return to original state,
and end as an error. Inbound Processing Method is not maintained in the Parameter Table.

Obtain from the parameter table the method of entering the goods movement (Select
Single
Search Condition

Parameter TableFUNC_AREAMM
Parameter TablePROJAS
Parameter TableLOCATG1
Parameter TableBUKRS3894
Parameter TableLEG_SYS3PL
Parameter TableFUN_ID0520102
Parameter TableCONV_OBINB_METHOD
When no records can be obtained from the above search condition, the current record should not
be processed and an error message should be outputted to the error file. MessageInbound
Processing Method is not maintained in the Parameter Table.
-1CIN Master Check
-1.1 Using the material and the plant from the inbound information , the
Material andChapter-ID combination master needs to be
checkedJ_1IMTCHID
If the master does not exist, an error mssage needs to be outputted
and the current record shlould not be prcessed. Error Message
Material and ChapterID combination for Material
&1MaterialPlant&2Plant does not exist.
-1.2 Using the material and the plant from the inbound information, the
CENVAT Determination needs to be checked(J_1IMODDET)
If the master does not exist, an error mssage needs to be outputted
and the current record shlould not be prcessed. Error Message
CENVAT Determination not maintained for Material:&1Material
Plant:&2Plant.
1.5.1 Inbound Process
Please set to Hold Stock (Blocked Stock), for the following conditions:

CASE For all items except EKKO: BSART=UB, ZUB


Inbound process execution using Move Type 105For the Inbound Process, base on
the inbound delivery number maintained in the Add-On Table, fetch the Ext. Delivery (LIKPLIFEX), then set the fetched value to the Reference (MKPF-XBLNR) to execute the inbound
process

CASE EKKO: BSART=UB


Inbound Process execution using Move Type 915

CASE EKKO: BSART=ZUB


Inbound process execution using Move Type 101

In order for the above Move Type 105, 915, 101, set the Delivery completion segment
(EKPO-ELIKZ) Flag to X.

In order for the above Move Type 105, 915, 101, set the system time: 2 digits,
munites; 2digits in Inbound deliverys item text(MSEG-SGTXT).
1.5.2 Update the order quantity on the purchase order
Add-On Table: Actual Inventory Quantity/Actual Inbound QuantityEKPO:MENGE
(Order Quantity)
Update to the actual inbound quantity using the received data for Order Quantity
(EKPO-MENGE)
Even no change in number of quantity, insert the original order quantity in the item text
Initial order quantity
1.5.3 Update item status on the Purchase Order
Update status to EKPO: LABNR
Status to 6 YYYYMMDD. YYYYMMDD will be the system date.
1.5.4 Update the process status on the Add-On Table
Update the status to C for the target process record
2. Inbound Process: Extract the target data from the Add-On Table (Return Goods order)
Extract the following data:

Item F/#=11
DATA Segment = H30, G30, K30
Add-On Table: Status(D or C)
(When Status=E (Error), then set as re-processing item)
Add-On Table: Status = Value fetched from the Screen
2.5 Order existence check

Add-On Table: Sales Number=VBAK: VBELN

Add-On Table: Sales Item Number=VBAP: POSNR

Add-On Table: Issue No.=Sales Order:Item Text

Add-On Table: Isse No. Add-On Table: Deletion Flag X


OK
Go to2.2
NG
Go to 5 error process
2.6 Inbound Check for corresponding Order number
Add-On Table: Sales Number=VBAK: VBELN
Add-On Table: Sales Item Number=VBAP: POSNR
When Sales Order Header status is NOT inbounded ( (VBUK: BUCHKLFGSKC))
OK
Go to 2.3
NG
Go to 5 error process
2.7 Inbound Order existence check
Add-On table: Sales Number=VBAK: VBELN
Add-On table: Sales Item Number=VBAP: POSNR
When Inbound document Header status is NOT inbounded ( (VBUK: WBSTKC))
If Inbound order is existing for the successive order VBFA
OK
Go to 2.
NG
Go to 5 error process
2.8 Quantity Chec
Add-On Table: Inbound quantity > Order quantity
NG
Go to 5 error process
Add-On Table: Inbound Quantity <= Order quantity
OK
Go to 2.5
2.9 Inbound Process Execution
If all process from 2.5.1 to 2.5.2 is NOT finished successfully, then return to original state, and end as an
error
2.9.4 Inbound Process
For Stock Type Hold Stock, process the following inbound process at each move type

Inbound process execution for Move Type 651


2.9.5 Change in order quantity for sales order
When the inbound quantity (at 2.4 quantity check) is less than the order quantity, change the order
quantity to inbound quantity.
2.9.6 Update the process status on the Add-On Table
Update the status to C for the process target record.
3. Inventory Process: Extract the target data from the Add-On Table (target all patterns)
Extract the following data:
Item F/#=12
DATA Segment = A11, A21, U11, U21, V11, N31, H31, G31, K31
Add-On Table: Status(D or C)
(When Status=E (Error), then set as re-processing item)
Add-On Table: Status = Value fetched from the Screen

3.9 Order Existence Check


DATA Segment: A11, A21, U11, U21, V11, N31, K31

Add-On Table: Sales Number=EKKO: EBELN

Add-On Table: Sales Item Number=EKPO: EBELP

Add-On Table: Issu No.=EKPO: SGTXT

Add-On Table: Issue No.Deletion Flag X


DATA Segment =H31, G31

Add-On Table: Sales Number=VBAK: VBELN

Add-On Table: Sales Item Number =VBAP: POSNR

Add-On Table: Issue No.=Sales Order: Item Text

Add-On Table: Issue No.Deletion Flag X


3.9.1 When Order Type is UB

Check if Purchase Order Item Text: Sales Order No. (TEXTID=15) exists in
the Add-On Table.
OK
Go to 3.2
NG
Go to 5 error process
3.11 Inbound check for corresponding Issue No.

Add-On Table: Purchase Number=EKKOEBELN

Add-On Table: Purchase Item Number =EKPOEBELP

Add-On Table: Sales Number=VBAKVBELN

Add-On Table: Sales Item Number =VBAPPOSNR

When in the Add-On Table, there exists a same Issue No. with F/#=11, and holds a
status=C.

(For Purhcase case) Delivery Completion Segment (EXPO: ELIKZ) = X, in the case
for Sales, Inbound document status as Delivery Complete. ((VBUK: BUCHKLFGSK=C
VBUK: WBSTK=C)
OK
Go to 3.3
NG
Go to 5 error process
3.12 Inventory Quantity Check
When there is not exist a same Issue No. in the Add-On Table with the record of F/#=12
(STATUS=C)
Add-On Table: Delivery Instruction Quantity <> (Inventory Quanity + Inventory
Remainder Quantity)
NG
Go to 5 error process
Add-On Table: Delivery Instruction Quantity = (Inventory Quanity + Inventory Remainder
Quantity)
OK
Go to 3.4
When there exists a same Issue No. in the Add-On Table with the record of F/#=12
(STATUS=C)
Add-On Table: Inventory Quantity > Previously received F/# = 12 in the Add-On Table:
Inventory Remainder Quantity
NG
Go to 5 error process
Add-On Table: Inventory <= Previously received F/# = 12 in the Add-On Table: Inventory
Remainder Quantity
OK
Go to 3.4
Add-On Table: (Inventory Quantity + Inventory Remainder Quantity) <> Previously
received F/# = 12 in the Add-On Table: Inventory Remainder Quantity
NG
Go to 5 error process
Add-On Table: (Inventory Quantity + Inventory Remainder Quantity) = Previously
received F/# = 12 in the Add-On Table: Inventory Remainder Quantity
OK
Go to 3.4
Please refer to Inventory Check for more information

3.13 Hold Stock Quantity Check


Hold Location EKPO:LGOBE LGORT (Purchase Order) or VBAP: LGORT (Sales Order)
Add-On Table: DepotPlant
Add-On Table: Inventory Quantity > Hold Stock Quantity
NG
Go to 5error process
Add-On Table: Inventory Quantity <= Hold StockQuantity
OK
Go to 3.5
3.14 Inventory Process Execution
If all process from 3.5.1 to 3.5.4 is NOT finished successfully, then return to original state, and end as an
error
3.14.1 Inventory Process

Inventory Process Execution (Stock Transfer) forMoveType 343, use the movement type
obtained from above

Maintain the process target Issue No. in the Goods Order Item Text
3.14.2
EKPOLABNR
7 YYYYMMDDYYYYMMDD
3.14.2 Update Process Status (for purchase order only)
When, Inventory Remainder Quantity = 0, Update the Status to EKPO: LABNR
Status to 7YYYYMMDD, YYYYMMDD will be the system date.
3.14.3 When Purchase Order Type = UB, then update the Inventory Quantity in the Add-On
Table (Shipping Instruction)
Sales Order Number from the Add-On Table: Shipping Instruction = 1st row of the item
text from the Sales order (Sales Order No.)
Item Number from the Add-On Table: Shipping Instruction = 2nd row of the item text from
the Sales order (Sales Order No.)
Add-On Table: Shipping Instruction Data Segment = U30 or U40 (maintain U30, U40 in
the parameter table)
Update the quantity in the field Inventory Quantity (ALCQUN BNQUN) when the
above condition matches. Updating method is to update the total of the addition of the
existing quantity in the field with the new quantity for the field.
3.14.4 Update the process status on the Add-On Table
Update status to C for the process target record
Return Inbound Execution (Not Used)
If the same Issue No with Add-On Table: F/#=12 record does not exist when processing the
Existence Process Target record (i.e. when there is only 1 record), execute the Inbound Cancel
(Move Type 122: Return Goods) for the quantity of {Delivery Instruction Quantity (Inventory
Quanity + Inventory Remainder Quantity)}, then change the inbound quantity to the actual
inbound quantity.
4. Defect Goods Process: Extract the Target Data in the Add-On Table (All patterns will be the
target)
Extract the following data:
Item F/#=12
DATA Segment = A12A22U12U22V12N32H32G32K32
Add-On Table: Status(D or C)
(When Status=E (Error), then set as re-processing item)
Add-On Table: Status = Value fetched from the Screen

4.15 Order Existence Check


DATA Segment = A12, A22, U12, U22, V12, N32, K32

Add-On Table: Purchase Number=EKKOBSART

Add-On Table: Purchase Item Number=EKPOEBELP

Add-On Table: Issue No.=EKPOSGTXT

Add-On Table: Issue No.Deletion Flag X


DATA Segment =H32, G32

Add-On Table: Sales Number=VBAKVBELN

Add-On Table: Sales Item Number =VBAPPOSNR

Add-On Table: Issue No.=Sales OrderItem Text

Add-On Table: Issue No.Deletion Flag X


OK
Go to 4.2
NG
Go to 5error process
4.16 Inbound Check for corresponding Issue No

Add-On Table: Purchase Number =EKKOBSART

Add-On Table: Purchase Item Number =EKPOEBELP

Add-On Table:Sales Number =VBAKVBELN

Add-On Table: Sales Item Number =VBAPPOSNR

When there exists a same Issue No of F/#=11with status=C in the Add-On Table

(For Purhcase case) Delivery Completion Segment (EXPO: ELIKZ) = X, in the case
for Sales, Inbound document status as Delivery Complete. ((VBUK: BUCHKLFGSK=C
VBUK: WBSTK=C)
OK
Go to 4.3
NG
Go to 5error process
4.17 Invenroty Quantity Check
When there is not exist a same Issue No. in the Add-On Table with the record of F/#=12
(STATUS=C)
Add-On Table: Delivery Instruction Quantity <> (DefectGoods Quantity + Inventory
Remainder Quantity)
NG
Go to 5 error process
Add-On Table: Delivery Instruction Quantity = (DefectGoods Quantity + Inventory
Remainder Quantity)
OK
Go to 4.4
When there exists a same Issue No. in the Add-On Table with the record of F/#=12
(STATUS=C)
Add-On Table: DefectGoods Quantity > Previously received F/# = 12 in the Add-On
Table: Inventory Remainder Quantity
NG
Go to 5 error process
Add-On Table: DefectGoods Quantity <= Previously received F/# = 12 in the Add-On
Table: Inventory Remainder Quantity
OK
Go to 4.4
Add-On Table: (DefectGoods Quantity + Inventory Remainder Quantity) <> Previously
received F/# = 12 in the Add-On Table: Inventory Remainder Quantity
NG
Go to 5 error process
Add-On Table: (DefectGoods Quantity + Inventory Remainder Quantity) = Previously
received F/# = 12 in the Add-On Table: Inventory Remainder Quantity
OK
Go to 4.4
Please refer to Inventory Check for more information
4.18 Hold Stock Quantity Check

Hold Location EKPO:LGOBE (Purchase Order) or VBAP: LGORT (Sales Order)


Add-On Table: DepotPlant
Add-On Table: Defect Goods Quantity > Hold Stock Quantity
NG
Go to 5error process
Add-On Table: Defect Goods Quantity <= Hold StockQuantity
OK
Go to 4.5
19.20 Defect Goods Execution
If all process from 4.5.1 to 4.5.4 is NOT finished successfully, then return to original state, and end as an
error
4.19.1 Defect Goods Process

Hold Location Move Process Execute for Move Type 909 (Move the Stock Status by
Hold Stock)

Maintain the process target Issue No. in the Goods Order Item Text

4.19When Purchase Order Type = UB, then update the Inventory Quantity in the Add-On Table
(Shipping Instruction)
Sales Order Number from the Add-On Table: Shipping Instruction = 1st row of the item
text from the Sales order (Sales Order No.)
Item Number from the Add-On Table: Shipping Instruction = 2nd row of the item text from
the Sales order (Sales Order No.)
Add-On Table: Shipping Instruction Data Segment = U30 or U40 (maintain U30, U40 in
the parameter table)
Update the quantity in the field Inventory Quantity (BNQUN) when the above condition
matches. Updating method is to update the total of the addition of the existing quantity in
the field with the new quantity for the field
20.20 Defect Goods Execution
If all process from 4.5.1 to 4.5.4 is NOT finished successfully, then return to original state, and end as an
error
4.19.2 Defect Goods Process

Hold Location Move Process Execute for Move Type 909 (Move the Stock Status by
Hold Stock)

Maintain the transferred Store Location per Plant in the parameter table.
4.19.3 Update the process status (for Purchase only)
For Inventory Remainder Quantity 0, then update the status to EKPO: LABNR
Status to 7 YYYYMMDD, YYYYMMDD system date
4.19.4 Update the process status on the Add-On Table
Update the status to C for the process target record
20.21 Return Inbound Execution (Not Used)
If the same Issue No with Add-On Table: F/#=12 record does not exist when processing the
Existence Process Target record (i.e. when there is only 1 record), execute the Inbound Cancel
(Move Type 122: Return Goods) for the quantity of {Delivery Instruction Quantity (Defect
Goods + Inventory Remainder Quantity)}, then change the inbound quantity to the actual
inbound quantity.
ZASG1XXT002-FUNC_AREA=MM
ZASG1XXT002-PROJ=AS
ZASG1XXT002-LOCAT=G1
ZASG1XXT002-BURKS=VBAK-BURKS_VF
ZASG1XXT002-FUN_ID=0520102
ZASG1XXT002-FLD1=VKORG

ZASG1XXT002-FLD2=VTWEG
ZASG1XXT002-FLD3=VSTEL
ZASG1XXT002-SAP_V1=VBAK-VKORG
ZASG1XXT002-SAP_V2=VBAK-VTWEG

5. Creation of Return Delivery Document by Item


20.21 Create Return Delivery Header by Sales Order Item
5.21.1 Create a new Routine
From t-code VOFM, in Menu: Data transfer / Deliveries, copy standard Routine 1 (Header) to 601
(Include RV50C601).
5.21.2 Development of the Routine
5.21.2.1 Execution of the Changed / Added logic for relevant Organizations
Control that the logic that needs to be changed / added in comparison with the standard
routine will be processed while creating delivery documents only for corresponding sales
orders that match with the following conditions stored in the parameter table
ZASG1XXT002:
ZASG1XXT002-FUNC_AREA=MM
ZASG1XXT002-PROJ=AS
ZASG1XXT002-LOCAT=G1
ZASG1XXT002-BURKS=VBAK-BURKS_VF
ZASG1XXT002-FUN_ID=0520102
ZASG1XXT002-FLD1=VKORG
ZASG1XXT002-FLD2=VTWEG
ZASG1XXT002-FLD3=VSTEL
ZASG1XXT002-SAP_V2=VBAK-VKORG
ZASG1XXT002-SAP_V2=VBAK-VTWEG
ZASG1XXT002-SAP_V3=VBAP-VSTEL
5.21.2.2 Contents of the changed / added logic
Set the combination criteria of the delivery header (LIKP-ZUKRL) with the concatenation
of the corresponding sales document number (CVBAP-VBELN) and sales document item
number (CVBAP-POSNR)
6. Job Log/Warning/Error Level
6.1 Warning File
6.1.1 4.6 Functional Data Map Mapping Sheet Description Warning Check
Field
6. Determining Job Log/Warning/Error Level
6.1 Warning File Output
6.1.1 The target field is when there is a documentation as Warning Check in the Description
of Mapping Sheet from the 4.6 Functional Data Map
6.2 Error File output
6.2.1 If a error occurs from 1 4 process, then create a Error File
6.2.2 Out put the Error File with Error Information
6.2.2.1 If the error occurs when inserting to the Add-On Table, then output the following
Time Stamp
Process Name
Program ID
Key Information: Order Number, Item Number
Error InformationError CodeError Description
6.3 Job Log Output
6.3.1 If the process from 1 5 successfully completes, then output to JobLog
6.3.1.1 Output the Total Count, Successful Count, Error Count for the insert to the Add-On
Table
6.4 Information File Output
6.4.1 Output a file for each records process result (Sort the output order by Issue No. If Issue
No. includes Error data, remove the target Issue No. data (including Complete data) to
the top.)
Time Stamp

Process Name
Program ID
Key Information: Supplier code(EKKO:LIFNR), Parts Number, Issue No, Data
Segment, (Purchase Number, Item Number, or Sales Number, Item Number), Inbound
Number, Parts Number, Delivery Instruction Quantity, Actual Inbound Quantity,
Inventory Remainder Quantity (Before), Actual Inventory Quantity, Defect Goods
Quantity, Inventory Remainder Quantity (After), Inventory Remainder
Quantity(Calculation), Difference Quantity, Goods Order Number, Status (Procurement
process status)
Delivery Instruction Quantity : Inbound Process : Delivery Instruction Quantity
Other
: - (Zero)
Actual Inbound Quantity : Inbound Process : Actual Inbound Quantity
Other
: Delivery Instruction Quantity
Inventory Remainder Quantity (Before) : first data; Delivery Instruction Quantity,
other; Previously received Inventory Remainder Quantity
Actual Inventory Quantity : Inbound Process : - (Zero)
Other
: Actual Inbound Quantity
Defect Goods Quantity : Defect Goods Quantity
Inventory Remainder Quantity (After) : Inventory Remainder Quantity
Inventory Remainder Quantity(Calculation) : Inventory Remainder Quantity
(Before) (Actual Inventory Quantity + Defect Goods Quantity)
Difference Quantity : Inventory Remainder Quantity (After) - Inventory
Remainder Quantity(Calculation)
Information
When finished successful: Goods Order number
When finished Error: Error Code, Error Description
When the quantity is revised b/c the inbound quantity differs for Sales Order and
Purchase Order: Output the quantity for the change before & after.

7. Status Update Process for Inbound Preparation Information (Add-On Table)


Update each process status to each record according to the following
Complete: C
Error:E
8. Completion Process
8.1 All process is complete

10

Potrebbero piacerti anche