2009 Feb 06 7:20 AM
Hi All,
I am having one report Zrt12 in that i am have selection screen
1.company code
2. plant
3.posting date (mkpf-budat)
4. material number (mseg-matnr)
I want to link this selection screen parameters with MB5B selection screen and I want to fetch only
opening stock for any material in my report so how can i achive this using SUBMIT statment.
Please give me the solution.
Thanks,
Ashish
2009 Feb 06 7:34 AM
Hi,
Or else you can go through this link.You can get an idea..
http://www.sapdevelopment.co.uk/reporting/rep_submit.htm
Regards
Kiran
Hi,
Or else you can go through this link.You can get an idea..
http://www.sapdevelopment.co.uk/reporting/rep_submit.htm
Regards
Kiran
2009 Feb 06 7:23 AM
hi,
In the paticular transaction or screen where you want to populate the field values,
press F1 on each field and try knowing the parameter ids corresponding of that fields.
Its easy F1> documentation-> technical help---> parameter ID.
Set parameter id : 'id1' field value1 ,
'id2' field 'value 2',
'id3' field 'value3'.
submit reportxxxx via selection-screen and return.
Hope this helps..
thanks
Sharath
2009 Feb 06 7:25 AM
Hi,
Please check the following link...
http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba50d35c111d1829f0000e829fbfe/content.htm
Regards
Kiran
2009 Feb 06 7:25 AM
Hi
check out this link for [Submit.|http://help.sap.com/abapdocu/en/ABAPSUBMIT.htm]
Hope this helps
Regards,
Jayanthi.K
2009 Feb 06 7:26 AM
Hi,
*"Table declarations...................................................
TABLES :
spfli. " Flight Schedule
*"Selection screen elements............................................
----
Frame for carrid *
----
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME .
SELECT-OPTIONS :
s_carrid FOR spfli-carrid. " Airline Code
SELECTION-SCREEN END OF BLOCK b1.
----
Ranges for spfli-carrid,spfli-connid *
----
RANGES :
r_carrid FOR spfli-carrid, " Airline Code
r_connid FOR spfli-connid. " Flight connection Id
*" Type declarations...................................................
"----
Type declaration of the structure to hold specified spfli fields *
"----
TYPES :
BEGIN OF type_s_spfli,
carrid TYPE spfli-carrid, " Airline Code
connid TYPE spfli-connid, " Flight Connection Number
cityfrom TYPE spfli-cityfrom, " Departure city
cityto TYPE spfli-cityto, " Arrival city
airpfrom TYPE spfli-airpfrom, " Departure airport
airpto TYPE spfli-airpto, " Destination airport
countryfr TYPE spfli-countryfr, " Country Key
countryto TYPE spfli-countryto, " Country Key
END OF type_s_spfli.
*" Field String declarations............................................
"----
Field string variable to hold spfli details *
*"----
DATA :
fs_spfli TYPE type_s_spfli. " Field string to hold spfli
" details
*"----
Internal Table to hold spfli,sflight details *
*"----
DATA :
t_spfli LIKE
STANDARD TABLE
OF fs_spfli. " Holds spfli details
*" Data declarations...................................................
"----
Work variables *
"----
DATA :
w_checkbox. " Variable to write checkbox
DATA :
w_lines TYPE i. " Holds linecount
"----
START-OF-SELECTION EVENT *
"----
START-OF-SELECTION.
PERFORM select.
"----
END-OF-SELECTION EVENT *
"----
END-OF-SELECTION.
PERFORM display.
"----
AT USER-COMMAND EVENT *
"----
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'SFLIGHT'.
PERFORM select1.
ENDCASE. " CASE SY-UCOMM
&----
*& Form select
&----
Selects spfli details for selected carrid range
----
No parameters transferred
----
FORM select .
SELECT carrid " Airline Code
connid " Flight Connection Number
cityfrom " Departure city
cityto " Arrival city
airpfrom " Departure airport
airpto " Destination airport
countryfr " Country Key
countryto " Country Key
FROM spfli
INTO CORRESPONDING FIELDS OF TABLE t_spfli
WHERE carrid IN s_carrid.
IF sy-subrc NE 0.
MESSAGE text-001 TYPE 'S'.
ELSE.
DESCRIBE TABLE t_spfli LINES w_lines.
ENDIF.
SET PF-STATUS 'YH1312_01'.
ENDFORM. " Select
&----
*& Form display
&----
Displays spfli details
----
No paramters transferred
----
FORM display .
LOOP AT t_spfli INTO fs_spfli.
WRITE : /2 w_checkbox AS CHECKBOX,
5 fs_spfli-carrid,
10 fs_spfli-connid,
20 fs_spfli-cityfrom,
35 fs_spfli-cityto,
50 fs_spfli-airpfrom,
65 fs_spfli-airpto,
85 fs_spfli-countryfr,
100 fs_spfli-countryto.
ENDLOOP. " LOOP AT T_SPFLI INTO ......
ENDFORM. " Display
&----
*& Form select1
&----
Selects records to display sflight details calling another *
report *
----
No Parameters transferred
----
FORM select1 .
DATA lw_lineno TYPE i VALUE 3.
DO w_lines TIMES.
READ LINE lw_lineno FIELD VALUE w_checkbox INTO w_checkbox
fs_spfli-carrid INTO fs_spfli-carrid
fs_spfli-connid INTO fs_spfli-connid
.
IF sy-subrc EQ 0.
IF w_checkbox EQ 'X'.
r_carrid-sign = 'I'.
r_carrid-option = 'EQ'.
r_carrid-low = fs_spfli-carrid.
APPEND r_carrid.
r_connid-sign = 'I'.
r_connid-option = 'EQ'.
r_connid-low = fs_spfli-connid.
APPEND r_connid.
ENDIF. " IF W_CHECKBOX EQ 'X'
CLEAR w_checkbox.
ENDIF. " IF SY-SUBRC EQ 0
ADD 1 TO lw_lineno.
ENDDO. " DO W_LINES TIMES
SUBMIT yh1312_030501f WITH s_carrid IN r_carrid
WITH s_connid IN r_connid AND RETURN.
ENDFORM. " Select1
-
TABLES :
spfli. " Flight Schedule
----
select options for spfli-carrid,spfli-connid *
----
SELECT-OPTIONS:
s_carrid FOR spfli-carrid, " Holds Airline code
s_connid FOR spfli-connid. " Holds Flight connection number
*" Type declarations...................................................
"----
Type declaration of the structure to hold specified sflight fields *
"----
TYPES :
BEGIN OF type_s_sflight,
carrid TYPE sflight-carrid, " Airline Code
connid TYPE sflight-connid, " Flight Connection Number
fldate TYPE sflight-fldate, " Flight date
seatsmax TYPE sflight-seatsmax, " Maximum capacity
seatsocc TYPE sflight-seatsocc, " Occupied seats
END OF type_s_sflight.
*" Field String declarations............................................
"----
Field string variable to hold sflight details *
*"----
DATA :
fs_sflight TYPE type_s_sflight. " Field string to hold sflight
" details
*"----
Internal Table to hold spfli,sflight details *
*"----
DATA :
t_sflight LIKE
STANDARD TABLE
OF fs_sflight. " Holds sflight details
"----
START-OF-SELECTION EVENT *
"----
START-OF-SELECTION.
PERFORM select.
"----
END-OF-SELECTION EVENT *
"----
END-OF-SELECTION.
PERFORM display.
&----
*& Form select
&----
Extracts sflight details
----
No Paramters transferred
----
FORM select .
SELECT carrid " Airline Code
connid " Flight Connection Number
fldate " Flight date
seatsmax " Maximum capacity
seatsocc " Occupied seats
FROM sflight
INTO CORRESPONDING FIELDS OF TABLE t_sflight
WHERE carrid IN s_carrid AND connid IN s_connid.
IF sy-subrc NE 0.
MESSAGE text-001 TYPE 'S'.
ENDIF.
ENDFORM. " Select
&----
*& Form display
&----
Displays sflight details
----
No Parameters transferred
----
FORM display .
LOOP AT t_sflight INTO fs_sflight.
WRITE :/2 fs_sflight-carrid,
10 fs_sflight-fldate,
25 fs_sflight-seatsmax,
45 fs_sflight-seatsocc.
ENDLOOP. " LOOP AT T_SFLIGHT INTO....
ENDFORM. " Display
-
Refer the above code,hope it helps you
2009 Feb 06 7:31 AM
Hi,
You have:-
I am having one report Zrt12 in that i am have selection screen
1.company code
2. plant
3.posting date (mkpf-budat)
4. material number (mseg-matnr)
Say in this report, you have parameter on selection screen as:-
1.company code : p_bukrs
2. plant : p_werks
3.posting date (mkpf-budat) : p_budat
4. material number (mseg-matnr) : p_matnr
Then use code:-
submit report Zrt12
with p_bukrs = <value>
with p_werks = <value>
with p_budat = <value>
with p_matnr = <value>
and return.
"<value> refere to the value of the field from the calling program
"use keyword 'and return' only if you want to return to the calling program from the called program
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir
Edited by: Tarun Gambhir on Feb 6, 2009 1:01 PM
2009 Feb 06 7:34 AM
Hi,
Or else you can go through this link.You can get an idea..
http://www.sapdevelopment.co.uk/reporting/rep_submit.htm
Regards
Kiran
2009 Feb 06 8:17 AM
Hi Mr Ashish,
Go through Kiran Shaka's Documentation
its Really very good
2009 Feb 06 8:23 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |