cancel
Showing results for 
Search instead for 
Did you mean: 

LIPS-VBELV confusion

Former Member
0 Kudos

Hi,

I am new to LE module, for the titled question I did search the forum and other places but found no answer.

For both outbound and inbound the field LIPS-VGBEL is used to capture SO and PO number. In LIPS I also found VBELV as 'origination document', someone said it will capture sales order number for outbound, but I found it blank and also not shown on any program SAPMV50A screens? Quite confused.

Thanks.

Nick

Accepted Solutions (1)

Accepted Solutions (1)

former_member223981
Active Contributor
0 Kudos

Hi Nick,

I debugged through the outbound delivery creation process to see where this value comes from. It is copied from table VBAP when the sales order item information is being transferred to the delivery. This leads to the question where VBAP-VBELV is filled.

I could see (in update debugging) that saving the sales order will populate VBAP-VBELV here:

Include LV45UF0V

-------------------------------

    CASE VBAPVB-UPDKZ.

      WHEN UPDKZ_NEW.

        FXVBAP-MANDT = VBAK-MANDT.

        FXVBAP-VBELN = VBAK-VBELN.

        IF NOT FXVBAP-POSNV IS INITIAL AND

           FXVBAP-VBELV IS INITIAL.

          FXVBAP-VBELV = VBAK-VBELN.  <<<<<<<<<<<<<<<<<<<<<<<<<

        ENDIF.

So VBAP-POSNV must not be initial for VBELV to be populated. This brings us to the question as to why (and when) POSNV is not populated.

VBAP-POSNV is populated immediately after you enter the item in the sales order. This happens here:

Include FV45PF0V_VBAP-VBELV_ERMITTELN

-------------------------------------------------------------------

if vbap-kzvbr = kzvbr_e or

    vbap-kzvbr = kzvbr_p and vbap-sobkz ne charq or   " Nicht Seiban

    vbap-sobkz = chare.

Bei Projektkontierung VBELV = VBELN setzen außer bei Sonderbestand

   if vbap-kzvbr eq charp and

      vbap-sobkz ne chare and

      vbap-vbelv is initial.

Gutschriften, Fakturaanforderungen

     vbap-vbelv = vbap-vbeln.

     vbap-posnv = vbap-posnr.

   else.

     if vbap-vbelv is initial.

       if kopieren = space or

          vbap-vgpos  is initial or

          tvcpa-upflu is initial or

          tvcpa-plmin ca '0 ' or

          ( cvbap-kzvbr is initial and

            cvbap-sobkz is initial ) or

          tvak-vbtyp = charg.         " Kontrakte erhalten immer

         " neuen Kostensammler

         if     ( vbap-vkgru(1) eq '1'   and

           not hvbap-posnv is initial ) OR

         only for CRM Repair orders

           ( vbap-uepvw = 'I' AND

             call_from_crm = 'X' AND NOT

             hvbap-posnv IS INITIAL ).

         Reparaturabwicklung

         vbap-vbelv = hvbap-vbelv.

         vbap-posnv = hvbap-posnv.

       else.

         vbap-vbelv = vbap-vbeln.

         vbap-posnv = vbap-posnr.

       endif.

Therefore, the above IF statements must be true for POSNV to be populated and subsequently the VBELV during save of sales order (It seems VBELV could also be updated at above code but in my particular example, this was not the point where it was updated).

I would suggest you set a breakpoint at the above if statement to see what is happening there on your system. This should explain why VBELV is not being filled on your example.

Hope this helps.

Former Member
0 Kudos

Hi Noel,

Many thanks for your help, yes, for Outbound scenario, when my sales order is for Project (vbap-sobkz ne chare) then VBELV is populated with the same value as VBELN.

The copy config in SPRO will take it into LIPS-VBELV.

However, for Inbound delivery scenario, LIPS-VBELV seems useless, as LIPS-VGBEL is taking PO number.

And for both scenarios, end user can't see this VBELV/POSNV on screen as in standard ECC.

Please correct me if my understanding above is incorrect, thanks.

Answers (0)