Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Invoice number

Hi all,

I have a print program which already in my R3 system..this for displaying Invoice details...now as the requirement has chnaged they want the PO number to be displayed instead of invoice refernce number(XBLNR)...when i tried to write the code in a report as...

PERFORM F_INVOICE_STRIPPING IN PROGRAM ZSFF_002_CHQ_ROUTINE

USING &REGUP-XBLNR&

CHANGING &VB_XBLNR&

ENDPERFORM

this i have written in my SAP SCRIPT....and in my program ZSFF_002_CHQ_ROUTINE i have written below code:

SELECT SINGLE BELNR FROM BKPF INTO LV_BELNR WHERE XBLNR = l_invno.

IF LV_BELNR NE ' '.

SELECT SINGLE EBELN FROM BSEG INTO LV_EBELN WHERE BELNR = LV_BELNR

AND KOART = 'S'.

IF LV_EBELN NE ' '.

SELECT SINGLE XERSY FROM EKPO INTO LV_XERSY WHERE EBELN = LV_EBELN.

ENDIF.

ENDIF.

IF LV_XERSY = 'X'.

CONCATENATE 'PO' LV_EBELN INTO LV_EBELN1.

READ TABLE outtab INDEX 1.

MOVE LV_EBELN1 TO outtab-value.

MODIFY outtab INDEX 1.

ELSE.

CONCATENATE 'IV' l_invno INTO LV_EBELN1.

READ TABLE outtab INDEX 1.

MOVE LV_EBELN1 TO outtab-value.

MODIFY outtab INDEX 1.

ENDIF.

but when i debubugg....i have found that my l_invno number is 'XXXXXXXXXXXXX'........how to chnage this value...is it taking the value internally...pls help...

Not what you were looking for? View more on this topic or Ask a question