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: 

ABAP - Incompletion Log updation - Adding fields to xVBUV

Former Member
0 Kudos

Hi,

I managed to populate the xVBUV table for specific customized fields which couldn't be maintained in the Incompletion procedures. The following code was used to populate the xVBUV table in the FORM "USEREXIT_CHECK_VBAK" :


   CONSTANTS : lc_insert LIKE xvbuv-updkz VALUE 'I',
                         lc_flag   LIKE xvbuv-msgkz VALUE 'X',
                         lc_sort   LIKE xvbuv-sortf VALUE '0010'.

   FIELD-SYMBOLS : <fs_xvbuv> LIKE LINE OF xvbuv.

   APPEND INITIAL LINE TO xvbuv ASSIGNING <fs_xvbuv>.
   MOVE sy-mandt   TO <fs_xvbuv>-mandt.
   MOVE pv_posnr   TO <fs_xvbuv>-posnr.     "The Item number where its incomplete
   MOVE pv_tbnam   TO <fs_xvbuv>-tbnam.   "Table name of the missing field(VBKD)
   MOVE pv_fdnam   TO <fs_xvbuv>-fdnam.    "Actual field name(PLTYP)
   MOVE tvap-fehgr TO <fs_xvbuv>-fehgr.       "Incompletion Procedure(i took the dynamic one)
   MOVE tvap-stgap TO <fs_xvbuv>-statg.
   MOVE lc_insert  TO <fs_xvbuv>-updkz.
   MOVE pv_fcode   TO <fs_xvbuv>-fcode.     "Function Code(this is working perfectly fine)
   MOVE lc_flag    TO <fs_xvbuv>-msgkz.
   MOVE lc_sort    TO <fs_xvbuv>-sortf.


Everything is working fine when i check the incompletion log while creation of the Sales Order through VA01. But the moment i click on save and though it gives a pop-up mentioning that the document is incomplete. I click on SAVE anyways and it saves the incomplete document.


Now if try re-editing it using VA02, it displays the following error message "Field PLTYP is not defined in incompletion procedure Y2".


I can understand that its obviously not defined in the incompletion procedure, precisely the reason why I am adding it through code. But is there anything I am missing here, coz its working perfectly in case i dont save it and check for incompletion while creating the document itself, then why the error while changing it, is out of my understanding.


Any help will be appreciated.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI Friends,

     Figured out the reason for the error message.

     SAP Support pack has an enhancement done in SAPLV45F(LV45FFUV) to check if the incompletion log entry done through ABAP for a particular Incompletion Procedure exists in the table TVUVF or not. In case the entry doesn't exist, the standard code throws an error. Hence the dialog message.

     Trying to figure out a way to overcome this issue. But atleast i could get to the root of it. Thanks all for your time and efforts.

Thanks and Regards,

Vadid

4 REPLIES 4

Lakshmipathi
Active Contributor
0 Kudos

The said field is available in standard incompletion procedure and not sure why you have gone for customizing.  May be if you can explain the business process and what exact control you need, suitable suggestion can be given.

G. Lakshmipathi

0 Kudos

Hi Lakshmipathi,

     Our requirement doesnt get fulfilled through standard customising as we want it for particular document types and particular conditions which can rather be easily managed through ABAP only.

    

     My problem is not with addition to the table VBUV(Incompletion Log), but that when I save the incomplete document. The system gives an error at the time of editing the incomplete document, as mentioned in the question.When i check in VBUV table, the entry has saved with the fields i added in xVBUV, but during editing of a previously saved incomplete document, after the error message mentioned in question, all the entries get removed from the incompletion log. Hence when i click the "Incompletion Log" option from menu, i get the "Document is complete".

    

     As far as the scenario goes, the functional are sure they want to go with ABAP changes only.

Regards,

Vadid Valiulla

0 Kudos

Moved from SAP ERP SD Sales to ABAP Development

G. Lakshmipathi

Former Member
0 Kudos

HI Friends,

     Figured out the reason for the error message.

     SAP Support pack has an enhancement done in SAPLV45F(LV45FFUV) to check if the incompletion log entry done through ABAP for a particular Incompletion Procedure exists in the table TVUVF or not. In case the entry doesn't exist, the standard code throws an error. Hence the dialog message.

     Trying to figure out a way to overcome this issue. But atleast i could get to the root of it. Thanks all for your time and efforts.

Thanks and Regards,

Vadid