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

Incompletion Procedure Not Working

Former Member
0 Likes
1,659

Hi,

In sales order creation is there any way of triggering the incompletion checking procedure before Saving the document.

Basically what I'm trying to do is:

1. Change the line item texts based on item category. Thus if item cat changes from A to B then the text nodes at the line item level should change from Z1 Z2 Z3 to Z1 Z5 Z6 Z7.

2. This works perfectly. However when the texts are replaced, some of the texts are marked as obligatory...

However if we go to the incompletion log , they dont show any errors about incomplete texts...

Any help will be highly appreciated and points rewarded of course...

Many Thanks

Hi ,

I have had a further look and have got this working ( I think).

Based on a suggestion in another thread from Wolfgang,

I am calling PFLICHTTEXTE_PRUEFEN(SAPLV45T) routine. This seems to work with the incompletion log being updated....

But now I am facing another issue..

Following is the scenario....

1. User enters item category A ... with obligatory text Z1 & Z2

2. User goes to incompletion log.. sees that Z1 & Z2 need to be populated.

3. User enters text in Z1.

4. User changes item categor to B.. with text-id Z3 & Z4 both are non-obligatory. System replaces texts Z1 & Z2 with Z3 & Z4.

5. User changes item category back to A.. system picks up Z1 & Z2 with the text entered by the user in step 3.

6. User goes to incompletion log.. and sees that system is showing error for both Z1 & Z2 even though Z1 shows entry by the user.

Is there some way of clearing out the text id's once the item category is changed? an initialization routine or some such?

<edit>

I mean is there any way of resetting the texts to their original state?

</edit>

Many Thanks,

Message was edited by: Preet D'Souza

6 REPLIES 6
Read only

christian_wohlfahrt
Active Contributor
0 Likes
1,443

Hi!

I just checked a sales order: if I delete and call 'incompletion log' (CTRL+F8) the missing entries are shown. Now I add a value (enter) and show the log -> it's empty again.

Calling the log triggers for me the check - how are your texts set to mandatory? In a different way than incompletion procedure?

Regards,

Christian

Read only

0 Likes
1,443

Hi Christian,

I am using MV45AFZZ user exits to change the item category of the sales order line item. The texts are determined based on the item category.

Thus Item category A has texts Z1 Z2 & Z3 assigned to it.

Item Cateogry B has texts Z3 Z4 & Z5 assigned to it.

The texts are marked as obligatory or non-obligatory in customizing.. i.e. there is an access sequence to determine text group and hence text id's from the item category.

When I change Item cat. via the user exit, the texts change as required. However if the new texts (Z3, Z4 & Z5) are marked as obligatory then the incompletion log is not updated.

Thus if the user runs VA01 and creates a sales order.. the exit is triggered for certain materials and item category is changed.

The texts are updated for the item category. These texts are marked in customizing as obligatory and since it is VA01 there are no entries in the text initially.

If the user now goes to "incompletion log" then what should happen is that there should be an entry for the missing texts.. but this does not happen.

I need to find a way of triggering the process by which SAP checks data for incompletion (at least this is my understanding).

Many Thanks,

Read only

0 Likes
1,443

Hi!

Just to get some more information about the incompletion tests:

Does this work the other way around, too? So a first mandatory text is replaced by the optional version, if you now delete the text manual you get an incomplete document?

And then: when is the check happening? Separate (while saving or displaying the log) or whenever data is changed. Set a watchpoint on table XBUV and check, in which moment entries are added. Via the calling path you should be able to see, from where this is called - and you should notice, if it's in the moment of text change or log display.

Regards,

Christian

Read only

0 Likes
1,443

Hi ,

I have had a further look and have got this working ( I think).

Based on a suggestion in another thread from Wolfgang,

I am calling PFLICHTTEXTE_PRUEFEN(SAPLV45T) routine. This seems to work with the incompletion log being updated....

But now I am facing another issue..

Following is the scenario....

1. User enters item category A ... with obligatory text Z1 & Z2

2. User goes to incompletion log.. sees that Z1 & Z2 need to be populated.

3. User enters text in Z1.

4. User changes item categor to B.. with text-id Z3 & Z4 both are non-obligatory. System replaces texts Z1 & Z2 with Z3 & Z4.

5. User changes item category back to A.. system picks up Z1 & Z2 with the text entered by the user in step 3.

6. User goes to incompletion log.. and sees that system is showing error for both Z1 & Z2 even though Z1 shows entry by the user.

Is there some way of clearing out the text id's once the item category is changed? an initialization routine or some such?

<edit>

I mean is there any way of resetting the texts to their original state?

</edit>

Many Thanks,

Message was edited by: Preet D'Souza

Read only

0 Likes
1,443

Hello Preet,

your users seem to be quite complicated....

Just a joke, i know that it's not easy to change item category on the fly.

There's a routine called 'VBAP_FUELLEN_TEXTE' in SAPFV45P which is normaly called when a new position is added or a material is changed. I'm in doubt if you could just use it, but you could check what happens in that routine and copy the parts you need to your exit. Specially the block

  • Alte Textinhalte initialisieren

IF *VBAP-MATNR NE SPACE AND

( NOT MATNR_CHANGED IS INITIAL OR

VBAP-MATNR NE *VBAP-MATNR ) OR

RV02P-AGUPD NE SPACE OR

( TVAP-TXTGR NE *TVAP-TXTGR AND

NOT *TVAP-TXTGR IS INITIAL ).

PERFORM POSTEXT_LOESCHEN_EINZELN(SAPFV45T) USING CHARA

VBAK-VBELN

VBAP-POSNR

TVAP-TXTGR.

ENDIF.

  • Füllen Textkommunikationsblock

PERFORM VBAP_FUELLEN_TVCOM.

could fit to your problem, but i think the 'IF' statement has to be an other in your case.

Regards Wolfgang

Read only

0 Likes
1,443

Hi Wolfgang,

Thanks for the reply. I am following your suggestions.. will let you know how it works out.

Many Thanks,