2006 Oct 19 1:14 PM
Hi Friends,
I want to get the data from the subroutine in the script without modifying the standard program,
Based on Billing Doc No.(Vbrk-vbeln) I have to get vbak-knumv.
Can any one send me the sample code I would be grate.
Thanx in advance,
Venu.
2006 Oct 19 1:19 PM
In sapscript put:
/: PERFORM <form> IN PROGRAM <prog>
/: USING &INVAR1&
/: USING &INVAR2&
......
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
......
/: ENDPERFORM
in program <prog> put a subroutine with following parameters:
FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
....
ENDFORM.
Hi Friends,
I want to get the data from the subroutine in the script without modifying the standard program,
Based on Billing Doc No.(Vbrk-vbeln) I have to get vbak-knumv.
Can any one send me the sample code I would be grate.
Thanx in advance,
Venu.
2006 Oct 19 1:19 PM
In sapscript put:
/: PERFORM <form> IN PROGRAM <prog>
/: USING &INVAR1&
/: USING &INVAR2&
......
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
......
/: ENDPERFORM
in program <prog> put a subroutine with following parameters:
FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
....
ENDFORM.
2006 Oct 19 1:25 PM
hi Venu,
Do this way ..
<b>/: PERFORM FORM_1 IN PROGRAM ZREPORT.</b>
<b>/:ENDFORM.</b>
Regards,
santosh
2006 Oct 19 1:26 PM
copy that standard program into another program and change that program name in the script and change the copied program according to our use, there will be small change in that subroutine with regard to field, if you can analyse you will find it easily.
i am not able to send the code as currently i am not able to find.
2006 Oct 19 1:31 PM
The link between billing doc and sales order can be of 1->many type.
vbrk->vbrp->vbak.
vbrk-vbeln links to vbrp-vbeln.
vbrp-aubel links vbak-vbeln.
2006 Oct 19 1:38 PM
2006 Oct 19 1:45 PM
here is to use TAX number field stcd2
use it for your purpose
1. create in se 80 zrutin.
FORM GETPIB TABLES IN_PAR STRUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA: LV_KUNNR TYPE KUNNR.
LOOP AT IN_PAR WHERE NAME = 'VBDKA-KUNNR'.
CONDENSE IN_PAR-VALUE.
MOVE IN_PAR-VALUE TO LV_KUNNR.
ENDLOOP.
IF SY-SUBRC <> 0 .
LOOP AT IN_PAR WHERE NAME = 'VBDKR-KUNRE'.
CONDENSE IN_PAR-VALUE.
MOVE IN_PAR-VALUE TO LV_KUNNR.
ENDLOOP.
ENDIF.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = LV_KUNNR
IMPORTING
OUTPUT = LV_KUNNR.
LOOP AT OUT_PAR WHERE NAME = 'STCD2'.
SELECT SINGLE STCD2 FROM KNA1 INTO
OUT_PAR-VALUE WHERE KUNNR = LV_KUNNR.
MODIFY OUT_PAR INDEX SY-TABIX.
ENDLOOP.
ENDFORM. " GETP
/: PERFORM GETPIB IN PROGRAM ZRUTIN
/: USING &VBDKA-KUNNR&
/: CHANGING &STCD2&
/: ENDPERFORM
AS <B>PIB: &STCD2&