cancel
Showing results for 
Search instead for 
Did you mean: 

About smart form

Former Member
0 Kudos

Hello Experts,

How to get fields & values for printing it on smart form ...if any one have code for that pplz forward me on following mail id....for example suppose i want to print Tax invoice with smart forms than how can i get the values from table "komv" like that. i am currently trying to make changes in standard program so what changes i need to do ..like i want Basic Bill Value, VAT 5%, Ser Tax, Total Amount, Deduct Mobilization Advance Propertionatly...

Reward points if it is useful.

mail id "talele.rahul@gmail.com"

Thanx in advace,

Rahul Talele

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

In the MAIN Window of the PO you can write the Program lines in Smartform and write your own code to fetch the related condition type amount from KONV tables

see the sample code written like that in a PO smartform

This is written under ITEM_PRICE_CONTROl

define the input paramters from the global data(like ZXEKKO, l_netwr) and define the Output paramters (like g_kschl, and G_VTEXT)

CLEAR: g_vtext,g_kwert,l_kwert.

CHECK NOT <ko>-kwert = <fs>-netwr.

  • Get Condition Type Text from table T685T and the value

SELECT SINGLE vtext INTO g_vtext FROM t685t

WHERE spras = sy-langu

AND kschl = <ko>-kschl.

IF sy-subrc = 0.

MOVE <ko>-kwert TO g_kwert.

ENDIF.

  • Check document currency

IF NOT l_netwr IS INITIAL.

WRITE g_kwert TO l_kwert CURRENCY zxekko-waers.

ENDIF.

*Determine if the discount is based on %

IF g_vtext CS '%' OR

g_vtext CS 'percentage' OR

<ko>-kschl = 'SKTO'.

<ko>-kbetr = <ko>-kbetr / 10.

MOVE '%' TO <ko>-waers.

ENDIF.

  • Determine Tax

IF g_vtext CS 'tax'.

ADD <ko>-kwert TO g_tax.

CLEAR g_kwert.

ENDIF.

  • Determine Freight Charges

IF g_vtext CS 'Freight'.

ADD: <ko>-kwert TO g_frakwert.

CLEAR g_kwert.

ENDIF.

Reward points for useful Answers

Regards

Anji

Answers (0)