Application Development 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: 

Routine creation for value split

Former Member
0 Kudos

Dear Gurus,

I got a requirement to Split condition values to no of line items in the sales order,

please guide us how to write a routine for this.

ex: value:100, no of line items:10

then the value should be:100/10= 10 for each line item.

Regards,

Abdul Rahim

6 REPLIES 6

krishna_k19
Contributor
0 Kudos

Hi Shaik,

     In pricing procedure , keep on more step and add your own routine there.
in that you write the code , you will get the line items data in XVBAP /XVBAP tables with out SO no. so based on this you can divide the value what you maintained in that step Condition.

Regards,

Krishna

former_member202771
Contributor
0 Kudos

Hi Abdul,

types : begin of  ty_tab,

          f1 type i,

          end of ty_tab.

data : i_tab type table of ty_tab,

          wa_tab type ty_tab.

data : l_value type i,

          l_lines type i,

          l_value1 type i.

l_value = 100.

l_lines = 10.

l_value1 = l_value / l_lines.

do l_lines times.

   wa_tab-f1 = l_value1.

   APPEND wa_tab to i_tab.

   ENDDO.


Thanks,

Anil

0 Kudos

HI,

this is for normal value split, but what we  need is i value value i.e, KOMP-KZWI4 =100

and count of line items will be aviable in sy_tabix of konv table.

Please guide me in that routine for pricing.

Regards,

Abdul Rahim

0 Kudos

Konv is having the condition records line items ,you should not consider konv table.

how you want , based on sales order line item or condition records line items.

Regards,

Krishna

0 Kudos

Hi,

It should be based on the no of sales order line items.

Regards,

Abdul Rahim

0 Kudos

Then you refer my earlier post.

in pricing procedure add one more step item. there you have to add your new routine.

in that use the below logic.

describe the line items from xvbap/vvbap (order line items data).

with that value -- 100/lineitems.

regards,

Krishna