Skip to Content
author's profile photo Former Member
Former Member

smart forms...

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 09:25 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.