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: 

Incompletion log in Sales order

Former Member
0 Kudos

Hi,

I have to remove certain fields for some conditions from Incompletion log of Sales order which is populated by SAP.

The fields are mentioned in the In completion procedure, but for certain conditions I should remove them

from incompletion log even though they are blank. Is there any BADI/ user exit which can allow me

to remove the fields from incompletion log even they are blank.

Tammy

1 ACCEPTED SOLUTION

naimesh_patel
Active Contributor

You should not simply remove the fields from XVBUV table. What you need to do is:

For Header incompletion, implement code in USEREXIT_CHECK_VBAK in MV45AFZB

  • populate the value in the respective field
  • After the User-exit, call these code to make sure XVBUV is properly updated

  PERFORM xvbuv_loeschen_vor_pruefen(sapfv45f) USING posnr_low
                                                     etenr_low
                                                     'VBAK      '.

  CALL FUNCTION 'RV_CHECK_DOCUMENT_INPUT'
    EXPORTING
      fehgr       = tvak-fehgr
      vbxx_wa     = vbak
      tbnam       = 'VBAK'
      dialog      = 'X'
      dia_visible = charx
    TABLES
      vbuv_dia    = dvbuv
      vbuv_tab    = xvbuv
      vbuv_last   = hvbuv.

  • If you wish to remove the values what you just added, set them back to its previous state. Which I wouldn't suggest.

If your incompletion fields are at line item level, implement the similar logic in USEREXIT_CHECK_VBAP. Implement the code wrt to VBAP to update XVBUV.

Regards,

Naimesh Patel

4 REPLIES 4

naimesh_patel
Active Contributor

You should not simply remove the fields from XVBUV table. What you need to do is:

For Header incompletion, implement code in USEREXIT_CHECK_VBAK in MV45AFZB

  • populate the value in the respective field
  • After the User-exit, call these code to make sure XVBUV is properly updated

  PERFORM xvbuv_loeschen_vor_pruefen(sapfv45f) USING posnr_low
                                                     etenr_low
                                                     'VBAK      '.

  CALL FUNCTION 'RV_CHECK_DOCUMENT_INPUT'
    EXPORTING
      fehgr       = tvak-fehgr
      vbxx_wa     = vbak
      tbnam       = 'VBAK'
      dialog      = 'X'
      dia_visible = charx
    TABLES
      vbuv_dia    = dvbuv
      vbuv_tab    = xvbuv
      vbuv_last   = hvbuv.

  • If you wish to remove the values what you just added, set them back to its previous state. Which I wouldn't suggest.

If your incompletion fields are at line item level, implement the similar logic in USEREXIT_CHECK_VBAP. Implement the code wrt to VBAP to update XVBUV.

Regards,

Naimesh Patel

0 Kudos

Hi,

I have written code to delete the record from XVBUV internal table for a field in one of exit routine(subroutine) in program MV45AFZB.

It has properly updated the incompletion log and has removed record from the log, after saving vbuv table was properly updated.

I am not getting what is purpose of calling subroutine xvbuv_loeschen_vor_pruefen(sapfv45f)

and function module 'RV_CHECK_DOCUMENT_INPUT' after deleting the record from XVBUV internal table.

Could you clear my doubt.

Tammy

0 Kudos

Hi Tammy,

I dont think you will have to call 'RV_CHECK_DOCUMENT_INPUT' for this requirement. As you did, updating the XVBUV table by deleting the entries will be fine for you. But as Patel have mentioned, this funtion module, I believe is to keep a check on the errors if any for the incompletion log. In the same way the sub routine that he has mentioed will be doing the deletion part from the internal tables.

Sam.

0 Kudos

RV_CHECK_DOCUMENT_INPUT makes sure that document determines proper incompletions based on content of your Fields. If you update the values for any of the incompletion related field, you should call the FM to make sure your XVBUV reflects what you have in your fields.

Regards,
Naimesh Patel