cancel
Showing results for 
Search instead for 
Did you mean: 

smartform help on currency key fields

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member196280
Active Contributor
0 Kudos

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

Former Member
0 Kudos

thanx,but how to declare the currency fields in my form send my code i am using

wa_ekpo-netpr,wa_ekpo-netwr..

Former Member
0 Kudos

Hi Shilpa,

Here is the solution.

Suppose the quantity variable is MENGE from table EKPO

In the Global definition, declare a variable

WA_MENGE type ekpo-menge.

Create program lines in the smartform(right click Main window and select the option <b>Create->Flow Logic->Program lines </b>.)

There , in the input parameters , put MENGE and in the output parameter, put WA_MENGE.Now assign Menge to WA_MENGE.

In the text element where u will display the text, instead of giving MENGE, give WA_MENGE..

Hope your query is satisfied.

Regards,

SP.

Former Member
0 Kudos

ok thanx wat about cuurency fields like ekpo-netpr and ekpo-netwr in smart form

where i have to declare?

Former Member
0 Kudos

hi thanx but can u send how to declare with code and path i am using wa_ekpo-netpr,wa_ekpo-netwr.

Former Member
0 Kudos

i am getting error in smartfrom while issue print-preview in se38 "Reference field <b>WA_EKPO-NETPR unknown in form."</b>

Former Member
0 Kudos

Hi Shilpa,

You can contact me at my mail id : sylendra.prasad@wipro.com

Regards,

SP.

Former Member
0 Kudos

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.