‎2007 Oct 17 4:00 AM
When i am using interactive alv's i am getting error , what is the error means after first list i have to switch over from list to predefined Transaction , there i have to display my data in my layout(User defined Layout) , but defaultly it is taking Pre Defined Layout , so it is possible to display my data in my layout insted of SAP pre defined layout.
‎2007 Oct 17 4:02 AM
Are you passing parameters marked in bold while calling ALV Function module?
clear x_layout.
x_layout-zebra = c_x.
x_layout-colwidth_optimize = c_x.
x_layout-no_colhead = space.
g_variant-variant = p_varant.
To Display the Output in ALV Format
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = g_repid
is_layout = x_layout
it_fieldcat = tb_fieldcat
<b>i_save = 'X'</b>
it_events = tb_events
it_sort = tb_sort
<b>is_variant = g_variant</b>
tables
t_outtab = tb_final
exceptions
program_error = 1
others = 2.
I am getting G_VARIANT from selection screen and passing the same to report.
Please let me know if you are clear with this analysis.
ashish
‎2007 Oct 17 4:02 AM
Are you passing parameters marked in bold while calling ALV Function module?
clear x_layout.
x_layout-zebra = c_x.
x_layout-colwidth_optimize = c_x.
x_layout-no_colhead = space.
g_variant-variant = p_varant.
To Display the Output in ALV Format
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = g_repid
is_layout = x_layout
it_fieldcat = tb_fieldcat
<b>i_save = 'X'</b>
it_events = tb_events
it_sort = tb_sort
<b>is_variant = g_variant</b>
tables
t_outtab = tb_final
exceptions
program_error = 1
others = 2.
I am getting G_VARIANT from selection screen and passing the same to report.
Please let me know if you are clear with this analysis.
ashish
‎2007 Oct 17 4:11 AM
no my code ls like
form val using user_command like sy-ucomm sel type slis_selfield.
DATA : field(10) type c.
SET PARAMETER ID 'SAK' FIELD I_OUTPUT2-HKONT.
SET PARAMETER ID 'BUK' FIELD I_OUTPUT2-BUKRS.
CALL TRANSACTION 'FBL3N' AND SKIP FIRST SCREEN.
endform. "VAL
here can we pass layout information how?
‎2007 Oct 17 4:13 AM
Hi,
No you can't pass layout information using CALL TRANSACTION.
Regards,
Atish
‎2007 Oct 17 4:14 AM
FBL3N is a report. So with the selected values you can populate selection screen entries and use SUBMIT command.
That is the correct way to pass value sand see result and not CALL TRANSACTION.
Hope this will help.
ashish
‎2007 Oct 17 4:22 AM
so what is the alternative to pass layout information and field information
‎2007 Oct 17 4:23 AM
hi thx but can u pls give me some code ex for submit statement for this
‎2007 Oct 17 4:26 AM
Here are the details for SUBMIT command. And it contains examples too -
You need to use option via SELECTION-SCREEN and populate parameter values to selection screen.
SUBMIT
Basic forms:
1. SUBMIT rep.
2. SUBMIT (name).
Extras:
1. ... LINE-SIZE col 2. ... LINE-COUNT line
3. ... TO SAP-SPOOL List output to the SAP spool database
4. ... USING SELECTION-SCREEN scr
5. ... VIA SELECTION-SCREEN
6. ... AND RETURN
7. ... EXPORTING LIST TO MEMORY
8. ... USER user VIA JOB job NUMBER n
9. ...Various additions for passing parameters to rep
10. ... USING SELECTION-SETS OF PROGRAM prog
Effect
Calls report rep.
The system leaves the active program and starts the new report rep. In basic form 2, you can specify the name of the report in the field name. You must specify the name in uppercase, otherwise a runtime error occurs.
Note
You can only start programs with type '1' using SUBMIT. If the program has a different type, the system triggers a runtime error.
Please consult Data Area and Modularization Unit Organization documentation as well.
Addition 1
... LINE-SIZE col
Effect
The list generated by the report has the line width col.
Addition 2
... LINE-COUNT line
Effect
The list generated by the report has line lines per page.
Addition 4
... USING SELECTION-SCREEN scr
Effect
When you execute the report, the system uses the selection screen number that you specify in the scr field. This must be a selection screen defined using the SELECT-OPTIONS, PARAMETERS and SELECTION-SCREEN statements.If you omit the addition, the system uses the standard selection screen 1000.
This addition allows you to start the same report in different situations, using a different selection screen each time.
Notes
1. The addition VIA SELECTION SCREEN determines whether the report is processed in the foreground or the background.
2. What happens if the required screen does not exist or is not a selection screen?
Screen 1000:
If you want to use the standard selection screen ( ... USING SELECTION-SCREEN 1000 or do not specify a ... USING SELECTION-SCREEN) addition, the system does not process a selection screen.
Other selection screens:
The system triggers a runtime error.
Addition 5
... VIA SELECTION-SCREEN
Effect
The selection screen is displayed. In this case, the selection screen is displayed again after the report list has been displayed. The values entered by the user remain displayed.
Addition 6
... AND RETURN
Effect
Returns to the calling transaction or program after the called program has been executed. SUBMIT ... AND RETURN creates a new internal session.
Addition 7
... EXPORTING LIST TO MEMORY
Effect
Does not display the output list of the called report, but saves it in ABAP memory and leaves the called report immediately. Since the calling program can read the list from memory and process it further, you need to use the addition ... AND RETURN . Also, since the called report cannot be requested for printing, the addition ... TO SAP-SPOOL is not allowed here. You can read the saved list from SAP memory with the function module 'LIST_FROM_MEMORY' and then (for example) store it in the database with EXPORT. You can process this list further with the function modules 'WRITE_LIST', 'DISPLAY_LIST' ... of the function group "SLST".
Addition 8
... USER user VIA JOB job NUMBER n
Effect
Schedules the specified report in the job specified by the job name job and the job number n. The job runs under the user name user and you can omit the addition USER user. The assignment of the job number occurs via the function module JOB_OPEN (see also the documentation for the function modules JOB_CLOSE and JOB_SUBMIT). This addition can only be used with the addition ...AND RETURN.
Note
When scheduling a report with the SUBMIT ... VIA JOB job NUMBER n statement, you should always use the addition ...TO SAP-SPOOL to pass print and/or archive parameters. Otherwise, default values are used to generate the list and this disturbs operations in a production environment.
SY-SUBRC = 0:
Job scheduled successfully
SY-SUBRC = 4:
Job scheduling terminated by user
SY-SUBRC = 8:
Error in job scheduling ( JOB_SUBMIT)
SY-SUBRC = 12:
Error in internal number assignment
Addition 10
... USING SELECTION-SETS OF PROGRAM prog
Effect
Uses variants of the program prog when executing the program rep.
Note
Important
The programs prog and rep must have the same SELECT-OPTIONS and PARAMETERs. Otherwise, variants of the program prog may be destroyed.
Note
When using this addition, the specified variant vari of the program prog is taken in USING SELECTION-SET vari. On the other hand, all variant-related actions on the selection screen of rep (Get, Save as variant, Display, Delete) refer to the variants of prog.
Example
SUBMIT REPORT01
VIA SELECTION-SCREEN
USING SELECTION-SET 'VARIANT1'
USING SELECTION-SETS OF PROGRAM 'REPORT00'
AND RETURN.
Effect
Executes the program REPORT01 with the variant VARIANT1 of the program REPORT00.
Note
Non-Catchable Exceptions:
LOAD_PROGRAM_NOT_FOUND: The specified program was not found.
SUBMIT_WRONG_TYPE: The specified program is not a report.
SUBMIT_IMPORT_ONLY_PARAMETER: Only one value passed to a report parameter.
SUBMIT_WRONG_SIGN: Invalid value passed to a selection with the addition SIGN.
SUBMIT_IN_ITAB_ILL_STRUCTURE: Table passed to a selection with WITH sel IN itab had an unexpected structure.
Hope this helps.
ashish
‎2007 Oct 17 4:38 AM
i used this
SUBMIT FBL3N VIA SELECTION-SCREEN
USING SELECTION-SET 'VARIANT1'
USING SELECTION-SETS OF PROGRAM 'ZFIGL_INTERCO_ACCOUNT'
AND RETURN.
but it is going to dump stating that FBL3N is not in library
‎2007 Oct 17 4:43 AM
‎2007 Oct 17 4:48 AM
‎2007 Oct 17 4:56 AM
Here is a sample
submit RFITEMGL with SD_SAKNR in r_hkont
Dd_BUKRS in r_bukrs
and return.
Populate ranges R_HKONT and R_BUKRS with G/L Account and Company Code values and pass the same to SUBMIT command.
Hope this helps.
ashish
‎2007 Oct 17 5:19 AM
I MADE A CODE LIKE
submit RFITEMGL with SD_SAKNR in I_OUTPUT
Dd_BUKRS in S_bukrs and return.
BUT IT IS COMING Dd_BUKRS in S_bukrs IS NOT EXPECTED
Y
‎2007 Oct 17 5:20 AM
HI,,
Give ur email id and send ur code to me ,i will definately help u out if d report is to be formed in ALV.
My email id is jo_kamaal@yahoo.co.in.
Regrads,
ric.s
‎2007 Oct 17 6:58 AM
Hi can i have u r mail id pls i need some help from u urgetn pls help me
‎2007 Oct 17 7:03 AM
sure u can have can have it,its<b> jo_kamaal@yahoo.co.in</b>,do send ur code as ftas as possible.
‎2007 Oct 17 7:05 AM
‎2007 Oct 17 4:04 AM
Check the following links:
http://www.sap-img.com/abap.htm
http://www.sap-img.com/abap.htm
http://www.sapbrain.com/FAQs/default.html
http://www.sap-img.com/abap/answers-to-some-abap-interview-questions.htm
http://www.sap-img.com/bapi.htm
http://www.sap-img.com/sapscripts/faq-for-sap-scripts.htm
http://www.sap-img.com/smartforms/smart-006.htm
http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
Please give me reward points...