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

code in smartforms

Former Member
0 Likes
582

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.

4 REPLIES 4
Read only

former_member188827
Active Contributor
0 Likes
551

wat do u mean by :"but when I am trying to execute my smartform no values are being populated into wa_proj and wa_prps"...r u using text elements to display da data in smartform???

Read only

0 Likes
551

ya i am populating the values to the text element...............i.e fields from wa_proj and wa_prps..................but it's not working

Read only

Former Member
0 Likes
551

Hi,

put a break point in the smartforms

i mean before displaying the vlaues

write program lines

and write some code

in order to see the values are coming in to

WA_PRPS

WA_PROJ or not

regards,

Venkatesh

Read only

0 Likes
551

hi ,

try IN CAPITAL.

WA_PRPS = WA_PRPS

WA_PROJ = WA_PROJ.