cancel
Showing results for 
Search instead for 
Did you mean: 

how to print multiple smartforms by giving a range of values into a select options.

0 Kudos

below their is code i write but its not printed a multiple forms its printed only single forms.

SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S31 { font-style: italic; color: #808080; } .L0S32 { color: #3399FF; } .L0S33 { color: #4DA619; } .L0S52 { color: #0000FF; } .L0S55 { color: #800080; } .L0S70 { color: #808080; }


REPORT ztruck_document NO STANDARD PAGE HEADING LINE-COUNT 225 LINE-SIZE 27.
TABLES:ausp.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS s_objek FOR ausp-objek.
SELECTION-SCREEN END OF BLOCK b1.

TYPES:BEGIN OF ty_ausp,
objek TYPE objnum,
atinn TYPE atinn,
atzhl TYPE wzaehl,
mafid TYPE klmaf,
klart TYPE klassenart,
adzhl TYPE adzhl,
atwrt1 TYPE atwrt,
atflv TYPE atflv,
END OF ty_ausp.

DATA : v_objek TYPE objnum.

DATA : it_ausp TYPE STANDARD TABLE OF zausp1 INITIAL SIZE 1,
wa_ausp TYPE zausp1.



DATA : it_fin TYPE STANDARD TABLE OF zausp1.
DATA : output_options TYPE ssfcompop.
DATA wa_fin TYPE zausp1.

INITIALIZATION.
AT SELECTION-SCREEN.
IF s_objek IS NOT INITIAL.
SELECT SINGLE objek FROM ausp INTO v_objek WHERE objek IN s_objek .
IF sy-subrc <> 0.
MESSAGE 'INVALID VEHICAL NO.' TYPE 'E'.
ENDIF.
ENDIF.

START-OF-SELECTION.

PERFORM fetch_data.
PERFORM display_form.
*&---------------------------------------------------------------------*
*& Form FETCH_DATA
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM fetch_data.
SELECT objek
atinn
atzhl
mafid
klart
adzhl
atwrt atflv FROM ausp INTO TABLE it_ausp WHERE objek IN s_objek.
*SORT IT_AUSP BY ATINN.



ENDFORM.
*&---------------------------------------------------------------------*
*& Form DISPLAY_FORM
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM display_form .
DATA : fname TYPE rs38l_fnam.
data: wa_output TYPE ssfcompop.
DATA : control_parameters TYPE ssfctrlop,
wa_cnt TYPE i,
wa_cnt2 TYPE i.


CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZTRUCK_DOCUMENT_LIST'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
fm_name = fname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.

DESCRIBE TABLE it_ausp LINES wa_cnt.
LOOP AT it_ausp INTO wa_ausp.
wa_cnt2 = sy-tabix.
CASE wa_cnt2.
WHEN 1.

control_parameters-no_open = space.
control_parameters-no_close = 'X' .
WHEN wa_cnt.

control_parameters-no_open = 'X' .
control_parameters-no_close = space .
WHEN OTHERS.
control_parameters-no_open = 'X' .
control_parameters-no_close = 'X' .
ENDCASE.

CALL FUNCTION '/1BCDWB/SF00000075'
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = CONTROL_PARAMETERS
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
OUTPUT_OPTIONS = wa_output
* USER_SETTINGS = 'X'
it_ausp = it_ausp
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
* EXCEPTIONS
* FORMATTING_ERROR = 1
* INTERNAL_ERROR = 2
* SEND_ERROR = 3
* USER_CANCELED = 4
* OTHERS = 5
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
ENDLOOP.
ENDFORM.

FredericGirod
Active Contributor
0 Kudos

Could you clarify your issu ?

0 Kudos

Frederic Girod

When is giving a two values into a select options its printing a only 1st values smartforms .

i want two print two different values two different smartforms .

FredericGirod
Active Contributor
0 Kudos

Your code looks ok, did you try to debug it ?

there is just a little comment your function module of the Smartforms accept a paramters IT_AUSP. If you loop on IT_AUSP you should send only the current line, not the whole table.

Accepted Solutions (0)

Answers (0)