2007 Dec 04 4:34 AM
HI Gurus
I am new abap help me with the select statement for these please
Get BKPF-AWKEY where BKPF-BELNR = VBRK-VBELN + prefix 00.
this is the reference number for printing in script(SD)
i need to write in the text elements
Get KNA1- STCEG where VBRK-KUNRG = KNA1-KUNNR This is the GST REG
how to write in the text elements.
Correct answers will be given full points.
thanks & regards
sirish.
2007 Dec 04 4:49 AM
Hi sirish,
First of all to add the prefix to vbrk-vbeln u can write the syntax like this-
CONCATENATE '00' VBRK-VBELN INTO VBRK-VBELN.
if 00 is suffix then write like this--
CONCATENATE VBRK-VBELN '00' INTO VBRK-VBELN.
Now u can write ur first select query like this-
SELECT awkey FROM bkpf
WHERE belnr = vbrk-vbeln.
Syntax for second select query-
SELECT stceg FROM kna1
WHERE kunnr = vbrk-kunrg.
Reward if useful.
Regards,
Rajesh Akarte
2007 Dec 04 4:58 AM
HI Rajesh,
i want to write this in scripts text elements. how to write this in text elements.
thanks & regards
sirish
2007 Dec 04 5:05 AM
Hi..
Write the query in program form(subroutine) n call the subroutine form the script using
/: PERFORM <form> IN PROGRAM <prog>
/: USING &INVAR1&
/: USING &INVAR2&
......
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
......
/: ENDPERFORM
2007 Dec 04 5:20 AM
Hi bhaskaran,
Can you please tell me what exactly to write in the program and the text element please. its urgent.
Points will be fully awarded.
Thanks&Regards
sirish
2007 Dec 04 6:22 AM
In script u can write like this
/: PERFORM getdetails IN PROGRAM ZPROG
/: USING &vbeln&
/: CHANGING &v_STCEG&
/: CHANGING &v_AWKEY&
/: ENDPERFORM
in ur ZPROG create one subroutine named getdetails
what ever u r passing from perform wil b der in in_tab(u hav to declare in_tab n out_tab of type itcsy)
extract values from in_tab..
use select query for fetching data
pass output to out_tab
FORM getdetails TABLES IN_TAB STRUCTURE ITCSY
OUT_TAB STRUCTURE ITCSY.
declare v_STCEG,v_AWKEY
...
ENDFORM.
2007 Dec 04 6:37 AM
hi
write like this
Mtrl.Code Description Quantity Value
&uline(70) &
&i_inv-matnr& &i_inv-arktx&
like this which field u want write in that form .
ok