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

smartforms calculation

Former Member
0 Likes
4,555

I created a smart forms.

in this, for example (2 * 13.90 = 27.80) come on the second line.  for first line, it is 0 . for last line it is not displayed. whats wrong with my program??

22 REPLIES 22
Read only

Former Member
0 Likes
4,527

please provide sample code for better understanding

Regards,

Monami.

Read only

Former Member
0 Likes
4,527

in se38. i write select statement declaring internal table and work area and as below.

CALL FUNCTION G_FMNAME

   EXPORTING

*   ARCHIVE_INDEX              =

*   ARCHIVE_INDEX_TAB          =

*   ARCHIVE_PARAMETERS         =

*   CONTROL_PARAMETERS         =

*   MAIL_APPL_OBJ              =

*   MAIL_RECIPIENT             =

*   MAIL_SENDER                =

*   OUTPUT_OPTIONS             =

    USER_SETTINGS              = 'X'

     WA_EKPO                    = WA_EKPO

     SO_EBELN                   = SO_EBELN

     WA_EKKO                    = WA_EKKO

     wa_mara                     = wa_mara

*    DATE                       = DATE

* IMPORTING

*   DOCUMENT_OUTPUT_INFO       =

*   JOB_OUTPUT_INFO            =

*   JOB_OUTPUT_OPTIONS         =

   TABLES

     TA_EKPO                    = TA_EKPO

     TA_EKKO                    = TA_EKKO

     ta_mara                    ta_mara

  EXCEPTIONS

    FORMATTING_ERROR           = 1

    INTERNAL_ERROR             = 2

    SEND_ERROR                 = 3

    USER_CANCELED              = 4

    OTHERS                     = 5



in smartforms, i declared an fieldsymbol.

<wa> like wa_ekpo.

for that amount calculation,  amount = <wa>-menge * <wa>-netwr.

Read only

0 Likes
4,527

Hi,

There might be sufficient space not available in the last case,check the table design details for the linetype. so, it may not be printed, for the first line check whether any of menge or netwr is 0,Please check.

Regards,

Monami.

Read only

0 Likes
4,527

actually, there is no problem of space and line type.. because all values are printing but on the successive lines not on the same line.

Read only

0 Likes
4,527

Hi,

I am not sure whether I understood the question correctly. If your requirement is to get the values on the same loop, then insert a program line and then do the calculation inside the loop.

Read only

Former Member
0 Likes
4,527

i declared like this only...

Read only

0 Likes
4,527

can you provide the Text editor screen in which you provide the logic for display.

i mean

this screen.

Read only

former_member196157
Active Participant
0 Likes
4,527

hiiii,

Write qty as    &w_vbak-menge(C)&  

For Price        &price(C)&

For Amount     &amount(C)&

and finally check the calculation using debugger

Read only

Former Member
0 Likes
4,527

Hi,

I think you wrote the code for qty on below image

Delete the First Default paragraph

follow the below image for Qty

Read only

Former Member
0 Likes
4,527

Read only

0 Likes
4,527

I Didn't get any message or image

i got this only

2014-03-21 16_18_23-Change Smart Form texts_ %TEXT28 New Text 28 Language EN.jpg

i declared like this only...

Read only

0 Likes
4,527

my image is

Read only

0 Likes
4,527

can you please check the Paragraph format  P5.

If you provide value 1 one for Space Before value will be displayed in next line.

In case if you provided delete the value.

Read only

0 Likes
4,527

no. i didn't give any spacing for that..it is blank.

Read only

Former Member
0 Likes
4,527

Dhivya,

The issue is regarding condensing the Qty field..

You should condense the variable.

Hope this will be helpful..

Read only

0 Likes
4,527

how to condense. i dont get it what you are saying sir..

thanks for you reply.

Read only

0 Likes
4,527

okay. Add (C) after &amount&..

e.g : &amount(C)&.

if this also not work try this : &amount(CZ)&.

Read only

0 Likes
4,527

i use that condense cz. but the problem is as below

Read only

Former Member
0 Likes
4,527

i got it now... thanks for everyone..

Read only

0 Likes
4,527

Dhivya .. you should share the solution...l

Read only

Former Member
0 Likes
4,527

ya sure sir...

because, initially, the order is text and then code.

then i changed the order like,

code and then text as below.

finally i got it.

Read only

0 Likes
4,527

LOL. Thts good.

This is what called Programming.. Well Done....