Skip to Content
0
Former Member
Sep 12, 2007 at 06:18 AM

code in smartforms

25 Views

hi.........

I am developing a smartform........using Zprogram.My zprogram coding is as follows...............here from my Zprogram I am exporting the structures wa_proj and wa_prps........when I am executing my Zprogram the values are being populated into the smartform............but when I am trying to execute my smartform no values are being populated into wa_proj and wa_prps.........I had defined in Form Interface in smartform also.....................What might be the problem....

Can anyone help me out........

Thanks in advance

tables:gmgr,proj,prps.

PARAMETERS: p_gnbr like gmgr-grant_nbr.

data:

l_wbs_element like gmgr-wbs_element,

wa_prps like prps,

wa_proj like proj.

data fm_name type RS38L_FNAM.

*Read WBS element

SELECT single wbs_element into l_wbs_element

FROM gmgr

WHERE grant_nbr = p_gnbr.

if sy-subrc = 0.

SELECT single * into wa_prps

FROM prps

WHERE pspnr = l_wbs_element.

if sy-subrc = 0.

SELECT single * into wa_proj

FROM proj

WHERE pspnr = wa_prps-psphi.

endif.

endif.

call function 'SSF_FUNCTION_MODULE_NAME'

exporting formname = 'ZSAMPLE'

  • variant = ' '

  • direct_call = ' '

importing fm_name = FM_NAME

exceptions no_form = 1

no_function_module = 2

others = 3.

if sy-subrc <> 0.

  • error handling

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

exit.

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'

WA_PRPS = wa_prps

WA_PROJ = wa_proj

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