cancel
Showing results for 
Search instead for 
Did you mean: 

MEDRUCK Problem

Former Member
0 Kudos

Hi all

Am using the standard MEDRUCK script for my PO.I made changes to that by copying in the Z format.After that am getting output like this in my main window.

Discount

Freight

VAT

Agrl market cess

But my user wants in the below order

Discount

Agrl market cess

VAT

Freight

It is in the conditons of ITEM_CONDITIONS.

Thiought i written the code separately for ( Discount,Agr market,VAT,Freight )in the order i wanted its giving me the output in d below order only

Discount

Freight

VAT

Agrl market cess

Please help me and tell me what to do to get the output in the format i wanted.

With Regards

Vijay

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You mayb writing the code in the driver program, but are u displaying it in the script in thar format?? I dnt think so.

Do check this.

Nayan

Former Member
0 Kudos

Hi nayan,

Am writing the code in the script only..Here is the Code below

/e ITEM_CONDITIONS

/: IF &KOMVD-VTEXT& EQ 'Discount (%)'.

IC &KOMVD-VTEXT(9)& &KOMVD-KBETR(CIZ)& &KOMVD- KOEIN&

/: ELSEIF &KOMVD-VTEXT& EQ 'Agrl Market Cess (%)'.

IC &KOMVD-VTEXT(9)& &KOMVD-KBETR(CIZ)& &KOMVD- KOEIN&

/: ELSEIF &KOMVD-VTEXT& EQ 'CST % (with C-form)'.

IC &KOMVD-VTEXT(20)&&KOMVD-KBETR(CIZ)&

/: ELSEIF &KOMVD-VTEXT& EQ 'VAT (%)'.

IC &KOMVD-VTEXT(9)& &KOMVD-KBETR(CIZ)& &KOMVD- KOEIN&

/: ELSEIF &KOMVD-VTEXT& EQ 'Freight (Value)'.

IC &KOMVD-VTEXT(9)& &KOMVD-KBETR(CIZ)& &KOMVD- KOEIN& Extra / Rate Includes

/: ELSEIF &KOMVD-VTEXT& EQ 'Freight/Quantity'.

IC &KOMVD-VTEXT(9)& &KOMVD-KBETR(CIZ)& &KOMVD- KOEIN&

/: ENDIF.

Vijay

Former Member
0 Kudos

Ok. What happens is when u write a code with IF else, all depends on your driver program as to when it sends the data. For ex u have written

/: IF &KOMVD-VTEXT& EQ 'Discount (%)'.

IC &KOMVD-VTEXT(9)& &KOMVD-KBETR(CIZ)& &KOMVD- KOEIN&

When the control comes from the driver prog to the script, it will check if KOMVD-VTEXT = 'Discount (%)' then this condition gets satisfied and the data is printed. SO it all depends on the data sent from the driver program.

I hope u have got the solution.

Nayan