Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

smart forms...

Former Member
0 Likes
384

I want to know how to proceed with the coding part in smart forms???also the explanation for coding??I need the interpretation for this code....Reply ASAP....

REPORT Z_SMARTFORM1.

tables : pa0001.

data : zitab1 like ZSTRUCT OCCURS 0 with header line.

data: month type i,

date type i,

year type i.

write:/ sy-datum.

year = sy-datum+2(2).

zitab1-z_year = year.

append zitab1.

date = sy-datum+6(2).

zitab1-z_date = date.

append zitab1.

write:/ zitab1-z_date.

*************displays month

month = sy-datum+4(2).

case month.

when 1.

zitab1-z_month = 'JANUARY'.

append zitab1.

write:/ zitab1-z_month.

when 2.

zitab1-z_month = 'FEBRUARY'.

append zitab1.

write:/ zitab1-z_month.

endcase.

DATA: FM_NAME TYPE RS38L_FNAM.

  • SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.

  • SELECT-OPTIONS : s_pernr FOR pa0001-pernr.

  • SELECTION-SCREEN END OF BLOCK a1.

  • start-of-SELECTION.

PARAMETERS: NO TYPE I.

select ENAME from pa0001 into table ZITAB1 where pernr = NO.

  • END-OF-SELECTION.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = 'ZSMARTFORM2'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = FM_NAME

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3

.

IF SY-SUBRC <> 0.

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

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

ENDIF.

CALL FUNCTION FM_NAME

  • EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

TABLES

GITAB = ZITAB1

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
366

This program will get the pernr and ename from the table pa0001 and displays it through the smartform "zsmartform2".

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'--->calls the smartform

CALL FUNCTION FM_NAME--->calls the function module of the form.

1 REPLY 1
Read only

Former Member
0 Likes
367

This program will get the pernr and ename from the table pa0001 and displays it through the smartform "zsmartform2".

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'--->calls the smartform

CALL FUNCTION FM_NAME--->calls the function module of the form.