‎2008 Feb 12 6:11 AM
Hi,
Kindly give me a sample code for this requirement..
1. I want to use a standard prgrm in my Zprogram.
2. by using the selction screen of std program and by using it's output, i need to send the data to a smartform.
Plz dont give me any links other than SDN, coz here all sites are blocked except this...
Kindly help..
With Rgds,
S.Barani
‎2008 Feb 12 6:45 AM
Hi Bharani,
u can use this
SUBMIT stdprg
USING SELECTION-SCREEN '1000'
WITH s_field1 IN s_field1
WITH p_field2 = p_field2
AND RETURN.
use this in ur driver program of Smartform ...
It will send the data from the std prorgam to your program .
Regards,
Sivappriya.
‎2008 Feb 12 6:28 AM
U can use SUBMIT <Std_rept_name> [ VIA SELECTION SCREEN ] -
Reward if useful
‎2008 Feb 12 6:33 AM
‎2008 Feb 12 6:35 AM
Hi Nandan ,
your question is little bit not clear .
First you can call a standard t code in z program but if you think you can get the data from the standard program in some internal table so it will not possible.
Generaly we use the BDC for such type of thigs,if use BDC then you may have all the data in your internal table but not from SAP program, but the data which you are sending to program. After that you can call u r smart forms.
hope it will help you.
Regards
Swati..
‎2008 Feb 12 6:38 AM
Hi,
U can directly write
SUBMIT <prg_name> via selection screen and return.
what id od is it willcall the given prg from u r program and after executing it control comes back to the program from where it called
plzz reward if it is useful to u
plzz dont forget to reward.....
‎2008 Feb 12 6:45 AM
Hi Bharani,
u can use this
SUBMIT stdprg
USING SELECTION-SCREEN '1000'
WITH s_field1 IN s_field1
WITH p_field2 = p_field2
AND RETURN.
use this in ur driver program of Smartform ...
It will send the data from the std prorgam to your program .
Regards,
Sivappriya.
‎2008 Feb 12 6:59 AM
Hi ,
i have written the code like this.
SUBMIT HINCEDT0
VIA SELECTION-SCREEN
EXPORTING LIST TO MEMORY
AND RETURN.
now, when i execute, it starts from the sel_scrren of my std-prgrm and it returns a HR form as output, how to avoid that and instead i need to pass to a smartform....
With Rgds,
S.Barani
‎2008 Feb 12 7:05 AM
Hi,
If you donot want the selection screen of the called program, you can use skip selection-screen.
Thanks,
Sriram Ponna.
‎2008 Feb 12 6:47 AM
Hi,
Please refer to the link below :
http://www.sapdev.co.uk/reporting/rep_submit.htm
Thanks,
Sriram Ponna.
‎2008 Feb 12 7:05 AM
HI,
use this addition to get the standard program's output into ur internal table............
... EXPORTING LIST TO MEMORY
Effect
This addition stores the basic list for the program accessed in the ABAP Memory. It can only be used together with the addition AND RETURN.
The list is stored in the ABAP Memory as an internal table of the row type ABAPLIST, ABAPLIST being a structured data type in the ABAP Dictionary.
The calling program can access the list stored once program access is completed, using function modules belonging to the function group SLST.
The function module LIST_FROM_MEMORY loads the list from the ABAP Memory to an internal table of the row type ABAPLIST.
The function module WRITE_LIST inserts the content of an internal table of the row type ABAPLIST in the current list.
The function module DISPLAY_LIST displays the content of an internal table of the row type ABAPLIST in a separate list screen.
Note
The addition can only work provided the function key Enter is not linked to a function code in the GUI status last defined for the program accessed.
Example
Once the program report has been accessed, the list stored there in the ABAP Memory is read by means of function modules and inserted in the current list.
DATA list_tab TYPE TABLE OF abaplist.
SUBMIT report EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = list_tab
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc = 0.
CALL FUNCTION 'WRITE_LIST'
TABLES
listobject = list_tab.
ENDIF.
Cheers,
jose.