on 01-03-2008 2:58 PM
Hi guys,
i want to display the date (bldat) from bkpf table in the form. im using standard prog J_1AF007 and the tcode is s_alr_87012222. i want to do this without changing the print program. for this we need to write routines. can any one tell me what values we need to pass and how can v get date from bkpf. can any one tell me how to do this.
thanks in advance.
Rahul
Hi Rahul,
I think u can use J_1AI02-BLDAT for printing it would solve the problem,if it doesnt give the right value,
use J_1AI02-BELNR and other values in the program given by George
instead of BKPF it would resolve the problem
Reward if useful.
Cheers,
Deepthee Kasal
Edited by: deepthee kasal on Jan 4, 2008 6:47 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello.
Copy the sapscript form to a Z one.
In the window you want to print the data write the following:
/: PERFORM ZGET_BLDAT IN PROGRAM ZAF_ROUTINES
/: USING &BELNR&
/: USING &GJAHR&
/: USING &BUKRS&
/: CHANGING &BKPF-BLDAT&
/: ENDPERFORM
In SE38 create the program ZAF_ROUTINES as an executable and create just the form ZGET_BLDAT as follows:
FORM ZGET_BLDAT TABLES in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
tables: BKPF.
data: wl_belnr like bkpf-belnr,
wl_gjahr like bkpf-gjahr,
wl_bukrs like bkpf-bukrs.
read table in_tab index 1.
wl_belnr = in_tab-value.
read table in_tab index 2.
wl_gjahr = in_tab-value.
read table in_tab index 3.
wl_bukrs = in_tab-value.
select single * from bkpf
where belnr = wl_belnr
and gjahr = wl_gjahr
and bukrs = wl_bukrs.
out_tab-value = bkpf-bldat.
MODIFY out_tab INDEX 1 TRANSPORTING value.
ENDFORM.
I have assumed that you already have the document number, year and company code in the form as BELNR, GJAHR and BUKRS variables known to the form.
Reward points if helpful.
Regards,
George
Edited by: George Lioumis on Jan 3, 2008 5:12 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.