cancel
Showing results for 
Search instead for 
Did you mean: 

Equipment Series number in Billing (Invoice) Document

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member209761
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Dear Hegal,

You are right, I am trying to print the Equipment Series number on the invoice hardcopy.

Based on the coding in invoice form (Tcode:se71), it is using the structure like VBDKR, VBDPR,KOMVD etc... Is there any structure is storing the series number??

Thank you.

former_member209761
Active Contributor
0 Kudos

Dear ,

Check this Structure

RIPW0

Please update once you find the solution.

Thanks & Regards,

Hegal

Former Member
0 Kudos

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.

former_member209761
Active Contributor
0 Kudos

Dear ,

Functionally that is the logic to get the serial /equipment number.

But for more details on the code, you may post a similar thread in ABAP forum.

If i find any details, i will revert back with it.

Thanks & Regards,

Hegal K Charles

former_member183879
Active Contributor
0 Kudos

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