Application Development and Automation 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: 
Read only

Updating Document Flow

Former Member
0 Likes
692

Hi,

I've created an inbound delivery from an outbound delivery. Now I need to update the document flow, and I've used the code below to do so. My problem is when viewing the document flow for the inbound delivery via VL33N - no document flow is shown. When I view the doc flow for the outbound delivery(VL03N), the inbound delivery shows up there.

Why doesn't doc flow show when viewing the inbound delivery?

Do I need to update document flow another way?


LOOP AT t_ib_lips INTO s_ib_lips.
      CLEAR s_ob_lips.

      READ TABLE t_ob_lips INTO s_ob_lips WITH KEY
                                               vgbel = s_ib_lips-vgbel
                                               vgpos = s_ib_lips-vgpos.
* test area for document flow
      CLEAR: s_vbfa.
      s_vbfa-mandt   = s_ib_lips-mandt.
      s_vbfa-vbelv   = s_ob_lips-vbeln.        "OB delivery number
      s_vbfa-posnv   = s_ob_lips-posnr.        "OB delivery item
      s_vbfa-vbtyp_v = is_ob_likp-vbtyp.       "OB delivery type
      s_vbfa-vbeln   = s_ib_lips-vbeln.        "IB delivery number
      s_vbfa-posnn   = s_ib_lips-posnr.        "IB delivery item
      s_vbfa-vbtyp_n = s_ib_likp-vbtyp.        "IB delivery type
      s_vbfa-rfmng   = s_ob_lips-lgmng.        "Referenced quantity
      s_vbfa-meins   = s_ob_lips-meins.        "uom
      s_vbfa-VRKME   = s_ob_lips-vrkme.
      s_vbfa-matnr   = '                 X'.
*      s_vbfa-stufe   = '00'.

      CALL FUNCTION 'RV_XVBFA_MAINTAIN'
           EXPORTING
                f_vorgang = 'H'
                fvbfa     = s_vbfa
                fvbfad    = s_vbfad
           TABLES
                fxvbfa    = t_xvbfa
                fyvbfa    = t_yvbfa
                fxvbapf   = t_xvbapf.

    ENDLOOP.

CALL FUNCTION 'RV_DOCUMENT_FLOW_UPDATE_U'
         EXPORTING
              f_vbeln  = is_ob_likp-vbeln
              i_status = 'H'
         TABLES
              fxvbfa   = t_xvbfa
              fyvbfa   = t_yvbfa.

Below is some of the data from the entry of VBFA that is created


VBELV	    POSNV    VBELN     POSNN  VBTYP_N  VBTYP_V	STUFE
100005128     1      180006319   1	7       J	00

1 REPLY 1
Read only

Former Member
0 Likes
432

Is there a BAPI you can use instead? Neither of these FMs are released or documented. It's quite a task trying to figure out how SAP uses these FMs to update.

Rob