cancel
Showing results for 
Search instead for 
Did you mean: 

stucked with looping and passing parameters to smartforms

Former Member
0 Kudos

hi

i am learning ABAP.help me how to loop(where we have to give condition) in smartforms and passing parameters.

if possible with screenshots

Regards,

padma

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

Right clk on window -> create -> flow logic -> loop its very simple to create loop. You can find all the details with in it.

Regards,

Naresh.

Former Member
0 Kudos

hi,

we can give loop in smartforms by two ways

1. right click on any node -> create loop.

this is use to display multiple records which are in ur int table.

e.g. various dates for PO.

2. in main window create table .

In that table we can pass our int table (loop) under data tab.

this is used to display item details which are usually multiple records.

for both syntax is -

1 - itab into itab ( if separate wa is not defined)

2 itab into wa (if separate wa is defined)

create text elements to display this records .

Former Member
0 Kudos

HI

i am trying to print the form by giving date,but its not looping,it just showing the single record.i want to print the records on that particular date.Also the second doubt is its not working if i give "selevt-options"

plz check the code which i was trying

REPORT YPROGRAM4.

DATA: BEGIN OF ITAB occurs 0,

EBELN TYPE EKKO-EBELN,

BUKRS TYPE EKKO-BUKRS,

LIFNR TYPE EKKO-LIFNR,

AEDAT TYPE EKKO-AEDAT,

TXZ01 TYPE EKPO-TXZ01,

MENGE TYPE EKPO-MENGE,

MEINS TYPE EKPO-MEINS,

COMP TYPE T001-ADRNR, "Company

VEND TYPE LFA1-ADRNR, "Vendor

END OF ITAB.

PARAMETERS: PAEDAT LIKE EKKO-AEDAT.

*DATA: WAEDAT TYPE EKKO-AEDAT.

*SELECT-OPTIONS: SO_AEDAT FOR WAEDAT.

Select EKKO~EBELN

EKKO~BUKRS

EKKO~AEDAT

EKKO~LIFNR

EKPO~TXZ01

EKPO~MENGE

EKPO~MEINS

EKPO~AEDAT

T001~ADRNR as COMP

LFA1~ADRNR as VEND

into corresponding fields of table itab

from ekko

join ekpo on

EKKOEBELN = EKPOEBELN

JOIN T001 on

EKKOBUKRS = T001BUKRS

JOIN LFA1 on

EKKOLIFNR = LFA1LIFNR

where EKKO~AEDAT = PAEDAT.

LOOP AT ITAB.

CALL FUNCTION '/1BCDWB/SF00000022'

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

COMP = ITAB-COMP

TXZ01 = ITAB-TXZ01

MEINS = ITAB-MEINS

MENGE = ITAB-MENGE

VEND = ITAB-VEND

EBELN = ITAB-EBELN

  • 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.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDLOOP.