Skip to Content
avatar image
Former Member

smartform help on currency key fields

hi

i want to concatenate wa_ekpo-netpr with currency key ? in smartform i have pass it and display the data. and i want to display the plant t001w details in my top of the form layout how and where i have to write the code how to declare fields?

pls send some steps and code

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Oct 05, 2007 at 07:26 PM

    for doing your concatination and building logic etc smartform provided with option called program lines, you can create program lines inside your smartform and do your concatination, do forget to pass input and output parameters in program line.

    Close the thread once your question is answered.

    Regards,

    SaiRam

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Shilpa,

      Here is the method.

      In the main program.

      DATA: FNAME TYPE RS38L_FNAM.

      DATA: ITAB TYPE TABLE OF EKPO WITH HEADER LINE.

      SELECT EBELN MATNR NETPR NETWR FROM EKPO INTO CORRESPONDING FIELDS OF TABLE ITAB UP TO 10 ROWS WHERE BUKRS = '1000'.

      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

      EXPORTING

      formname = 'ZSP_SMFORM1'

      IMPORTING

      FM_NAME = FNAME

      EXCEPTIONS

      NO_FORM = 1

      NO_FUNCTION_MODULE = 2

      OTHERS = 3

      .

      CALL FUNCTION FNAME

      TABLES

      itab = ITAB[]

      EXCEPTIONS

      FORMATTING_ERROR = 1

      INTERNAL_ERROR = 2

      SEND_ERROR = 3

      USER_CANCELED = 4

      OTHERS = 5

      .

      In the smartform,

      1) In the Form interface, give

      ITAB LIKE EKPO

      2)In the Global definitions, give

      WA_NETPR TYPE EKPO-NETPR

      WA_NETWR TYPE EKPO-NETWR

      WA_ITAB TYPE EKPO

      3)In main window , create a loop(Right click and goto <b>Create->Flow Logic->Loop</b>)

      Give the loop as

      ITAB INTO WA_ITAB

      4) Now create a template(Right click and goto<b>Create->Template</b>).

      Create 4 columns(each of 4 CM and height 2 cm)

      5) Now create program lines (right click and goto <b>Create->Flow Logic->Program lines</b>.)

      In the input parameter, give wa_itab-netpr and wa_itab-netwr

      In the output parameter, give wa_netpr and wa_netwr.

      In the editor, give the follwoing lines

      wa_netpr = wa_itab-netpr.

      wa_netwr = wa_itab-netwr.

      6) Now create the text (right click and goto<b>Create->text</b>).

      In the general attributes for ebeln and matnr , give as

      &wa_itab-ebeln and &wa_itab-matnr

      For netpr and netwr, give as wa_netpr and wa_netwr.

      This will definitely solve your problem.

      Regards,

      SP.