on 01-11-2011 4:07 AM
Dear Experts,
Good day to you.
There is a request to add the equipment Series No in the invoice form. When user print the DO form, the series number will be printed on the DO form but not the Invoice, so user requested to add the Series number onto the Invoice form. Any advise how to add this?
For the invoice form, coding below:-
SPACE_LINE
HEADER_DATA
INCLUDE &VBDKL-VBELN_VAUF(K)& OBJECT VBBK ID 0002 NEW-PARAGRAPH TH
HEADER_TEXT
ITEM_HEADER
ITEM_LINE
DEFINE &ORDERNO1& = &VBDPL-VGBEL+(5)&
DEFINE &ORDERNO2& = &VBDPL-VGBEL+5(5)&
PERFORM XVBAP1 IN PROGRAM ZSRS0002_OCE
USING &ORDERNO1&
USING &ORDERNO2&
USING &VBDPL-VGPOS&
USING &VBDPL-LFIMG&
CHANGING &BACKORDER&
CHANGING &ORDERQTY&
CHANGING &NETPR&
CHANGING &NETWR&
CHANGING &DISTXT1(80)&
CHANGING &DISTXT2(80)&
CHANGING &DISTXT3(80)&
CHANGING &DIS1(80)&
CHANGING &DIS2(80)&
CHANGING &DIS3(80)&
CHANGING &VBAPREF&
CHANGING &MATGRP&
ENDPERFORM
DEFINE &ZNHGVPN&
DEFINE &ZNHGBIN&
PERFORM GET_VPN_BIN IN PROGRAM ZSRS0002_OCE
USING &VBDPL-MATNR&
USING &VBDPL-WERKS&
USING &VBDPL-LGORT&
CHANGING &ZNHGVPN&
CHANGING &ZNHGBIN&
ENDPERFORM
VPN : &ZNHGVPN& BIN : &ZNHGBIN&
,,,,,,,,,,VPN : &ZNHGVPN& BIN : &ZNHGBIN&
&VBDPL-POSNR+03(03)&,,&VBDPL-MATNR(10)&,,&VBDPL-VRKME(03)&
,,&ORDERQTY(6)&,,&VBDPL-LFIMG(6)&,,&MATGRP(C)& &VBDPL-ARKTX&
,,&NETPR&,,&NETWR&
,,&VBDPL-LFIMG(6)&,,&MATGRP(C)& &VBDPL-ARKTX&,,&NETPR&,,&NETWR&
,,,,,,,,,,&distxt1(20)& &dis1(15)&
,,,,,,,,,,&distxt120(20)& &dis115(15)&
,,,,,,,,,,&distxt140(20)& &dis130(15)&
,,,,,,,,,,&distxt160(20)& &dis145(15)&
,,,,,,,,,,&distxt2(20)& &dis2(15)&
,,,,,,,,,,&distxt220(20)& &dis215(15)&
,,,,,,,,,,&distxt240(20)& &dis230(15)&
,,,,,,,,,,&distxt265(20)& &dis245(15)&
,,,,,,,,,,&distxt3(20)& &dis3(15)&
,,,,,,,,,,&distxt320(20)& &dis315(15)&
,,,,,,,,,,&distxt340(20)& &dis330(15)&
,,,,,,,,,,&distxt360(20)& &dis345(15)&
INCLUDE &VBAPREF& OBJECT VBBP ID 0001 PARAGRAPH TH
ITEM_LINE_DG_HEADER
ITEM_LINE_DG
ITEM_LINE_DG_TEXT
ITEM_LINE_BATCH
,,&'Batch 'VBDPL-CHARG&,,&VBDPL-LFIMG(I15)&,,&VBDPL-VRKME&
,,&VBDPL-NTGEW(I15)&,,&VBDPL-GEWEI(03)&
ITEM_LINE_CONFIGURATION_BATCH_
,,With the following batch valuation:
,,&CONF_OUT-ATBEZ&,,&CONF_OUT-ATWTB&
ITEM_LINE_CONFIGURATION_BATCH
,,&CONF_OUT-ATBEZ&,,&CONF_OUT-ATWTB&
ITEM_LINE_CONFIGURATION_HEADER
,,With the following configuration:
,,&CONF_OUT-ATBEZ&,,&CONF_OUT-ATWTB&
ITEM_LINE_CONFIGURATION
,,&CONF_OUT-ATBEZ&,,&CONF_OUT-ATWTB&
ITEM_REFERENCE
,,&'Order'VBDPL-VBELN_VAUF& &'from'VBDPL-AUDAT_VAUF&
,,&'Purchase order no.'VBDPL-BSTNK&
ITEM_PURCHASE_DATA
,,&'Purchase order no._K /Item:'VBDPL-BSTKD& &'/'VBDPL-POSEX&
,,&'Purchase order no._W /Item:'VBDPL-BSTKD_E& &'/'VBDPL-POSEX_E&
DG_STANDARD_TEXT
INCLUDE &RDGTXTPRT-TDNAME& OBJECT HZ01 ID HZ01
SUPPLEMENT_TEXT
IF &VBDKL-LFART& = 'CRDO' OR &VBDKL-LFART& = 'LR' OR &VBDKL-LFART& = 'CP >
DEFINE &ORDERNO1& = &VBDKL-VGBEL+(5)&
DEFINE &ORDERNO2& = &VBDKL-VGBEL+5(5)&
PERFORM XVBAK1 IN PROGRAM ZSRS0002_OCE
USING &ORDERNO1&
USING &ORDERNO2&
CHANGING &ORDERREASON&
ENDPERFORM
**Order Reason: &ORDERREASON&
ENDIF
DEFINE &ORDERNO1& = &VBDKL-VBELN_VAUF+(5)&
DEFINE &ORDERNO2& = &VBDKL-VBELN_VAUF+5(5)&
PERFORM XVBAKWAERK IN PROGRAM ZSRS0002_OCE
USING &ORDERNO1&
USING &ORDERNO2&
CHANGING &WAERK&
CHANGING &VBAKREF&
CHANGING &DEPOSIT&
ENDPERFORM
INCLUDE &VBAKREF& OBJECT VBBK ID 0001 NEW-PARAGRAPH TH
Dear ,
I assume that your requirement is to Print the Equipment number in Invoice.
If you are asking for the logic of getting the Equipment number from the invoice, then please try the following logic.
Input 'invoice number' as VBELN in VBFA and get VBELV with VBTYP_V= J
Input 'VBELV' from the above step in SER01 as LIEF_NR and get 'OBKNR'
Input 'OBKNR' from the above step in OBJK as 'OBKNR' and get 'EQUNR'.
This EQUNR will be the equipment number and SERNR will be the Serial number.
Please check and confirm whether your requirement is fulfilled with the above logic.
Thanks & Regards,
Hegal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Hegal,
How do I check whether the series number is stored in RIPW0?
I notice that the Series Number was printed on DO and I double checked the DO form, I notice the DO form is retrieve the data from KOMSER.. The coding as below:-
ITEM_LINE_SERIAL_NO_HEADER
,,,,,,,,,,SerialNo.:&KOMSER-SNRLN(50)&
ITEM_LINE_SERIAL_NO
,,,,,,,,,,&KOMSER-SNRLN(50)&
I tried to add these coding to the Invoice form, unfortunately the Series number cannot appear.
Hi,
Equipments are created in CS actually. Every equipment also will have a sales order associated wtih it.
So if you have the invoice, find out the sales order for the line item of the invoice using the VBFA table.
Once that is found, find out the Eqmt no from the structure ITOBATTR, or even try to explore the table EQBS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.