‎2006 Aug 29 6:01 PM
Hello experts,
I need to get domestic and international address fron t001e using company code.How can I write select statements in Scripts.I am using standard print program
YFKORD11.
Please suggest me.
Thanks
‎2006 Aug 29 6:04 PM
‎2006 Aug 29 6:08 PM
Hi Rich,
I am using standard print program .How can I call PERFORM from script for standard program.
please guide me
Thanks
‎2006 Aug 29 6:12 PM
Right, all you need to do is create a "Z" program which will house all of your FORM(subroutines), then you can simple call them from the sapscript. You specify what program the FORM is in, when you call it.
There is a specific interface for calling FORMs from sapscripts.
Please see this link.
http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/803279454211d189710000e8322d00/frameset.htm
Please remember to award points for any helpful answers. Thanks.
Regards
Rich Heilman
‎2006 Aug 29 6:09 PM
Hey u can do one thing here
write an executable program, in that declare the logic in subroutines with form-endform then call this program or routine in scipt with perform statement
put the perform statement in the window where u want to execute this select statement navigation
window-edit-elements-goto change mode
after endif write the perform statement
Naveen
‎2006 Aug 29 6:11 PM
I can write exe program.But my out put has been assigned to standard program.In that case how can I do that.
Thanks
‎2006 Aug 29 6:18 PM
it does not matter with the print program
just write the logic in executable program seperatly
n then call this routine in script
is it ok for u
if u need any further info let me know
naveen
‎2006 Aug 29 7:24 PM
Hi Rich and naveen,
Thanks for your reply.I am checking it now.Any how I am awarding points for ur help.
I write code in 'Z' as
REPORT ZE_FI_F0031.
TABLES: T001E, ADRC,BKPF.
FORM GET_ADDRESS.
Select single * from t001e where bukrs = BKPF-BUKRS.
if sy-subrc eq 0.
select single * from adrc where addrnumber = t001e-adrid.
endif.
ENDFORM. " FORM GET_ADDRESS
How can I can this perform.
suggest me.
Regards
rahul
‎2006 Aug 29 7:28 PM
‎2006 Aug 29 7:33 PM
Something more along these lines.
*---------------------------------------------------------------------*
* FORM GET_ADDRESS *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
form get_address tables in_tab structure itcsy
out_tab structure itcsy..
data: bukrs type bkpf-bukrs.
read table in_tab with key name = 'BKPF-BUKRS'.
if sy-subrc = 0.
bukrs = in_tab-value.
endif.
select single * from t001e
where bukrs = bukrs.
if sy-subrc eq 0.
select single * from adrc
where addrnumber = t001e-adrid.
if sy-subrc = 0.
* Get the record for CITY1 in the output and modify the value.
read table out_tab with key name = 'CITY1'.
if sy-subrc = 0.
out_tab-value = adrc-city1.
modify out_tab index sy-tabix.
endif.
endif.
endif.
endform. " FORM GET_ADDRESS
Regards,
Rich Heilman