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: 

Credit check does not dismiss picked quantity

daniel_hermann
Explorer
0 Kudos

Hello,

first of all sorry for double post http://scn.sap.com/message/14084569 (Admin could you delete this one please)

I have a problem with

BaDI LE_SHP_DELIVERY_PROC

Method CHANGE_DELIVERY_ITEM

Here I insert the picked quantity on creation of the delivery:

if ( cs_likp-vkorg NE '1000' )

   and ( IF_FLAG_NEW_ITEM = 'X' ).

     cs_lipsd-pikmg   = cs_lips-lfimg.

     cs_lipsd-g_lfimg = cs_lips-lfimg.

     cs_lipsd-vrkmp   = cs_lips-vrkme.

     cs_lipsd-updkz   = 'u'.

     cs_lipsd-lips_up = 'u'.

     cs_v50agl_cust   = 'x'.

     perform pickmenge_bearbeiten in program sapfv50p.

endif.

Now I got the problem that without this coding I am not able to insert a picked quantity because of credit check.

"Subsequent function '' not possible due to a credit block" should appear in here but it doesn't.

How could I get this message or how do I prevent my code to be executed when a credit block is active?

Could anyone help me please.

1 ACCEPTED SOLUTION

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

Look for the credit status for the SD document (delivery, sales order) in tables VBUK (or VBUP for item).

I hope this helps you

Regards

Eduardo

2 REPLIES 2

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

Look for the credit status for the SD document (delivery, sales order) in tables VBUK (or VBUP for item).

I hope this helps you

Regards

Eduardo

0 Kudos

I found a solution:

data: wa_xvbuk type vbukvb.

   if ( cs_likp-vkorg ne '1000' )

     and ( if_flag_new_item = 'X' ).

       loop at it_xvbuk into wa_xvbuk.

        if ( wa_xvbuk-cmpsa ne 'B' )

          cs_lipsd-pikmg   = cs_lips-lfimg.

          cs_lipsd-g_lfimg = cs_lips-lfimg.

          cs_lipsd-vrkmp   = cs_lips-vrkme.

          cs_lipsd-updkz   = 'u'.

          cs_lipsd-lips_up = 'u'.

          cs_v50agl_cust   = 'x'.

          perform pickmenge_bearbeiten in program sapfv50p.

        endif.

       endloop.

   endif.

Thank You for help!