Skip to Content
0

Bapi_pr_create - Value additional fields when Overall limit is used

Dec 08, 2016 at 02:16 PM

217

avatar image
Former Member

Goodmorning everyone, I'm stuck with a BADI.

When i try to load a Purchase requisition through BAPI_PR_CREATE , I can not fill two additional fields (Begin accural date - End accura date).

I valued the extensionin structures, appending the fields using the structure BAPI_TE_MEREQITEMX.

Everything works except when I try to load a PR with type position PSTYP = 1 (Overall limit valued).

what should I do?

Thank you all.

Greetings

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Jürgen L Dec 09, 2016 at 11:39 PM
0

you are talking about Z-fields?

You said it did not work for PSTYP = 1 , did it really work for other item categories?

have you tested this specific case already in ME51N? did it work?

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Dec 10, 2016 at 11:17 AM
0

Thank you Jürgen.

Yes, I'm talking about Z-fields (Begin accural date - End accural date).

It works for item category "Standard" (not valued).

Testing in ME51N, I can insert the fields... It works...

Share
10 |10000 characters needed characters left characters exceeded
Simone Milesi Dec 12, 2016 at 08:26 AM
0

Hi Giuliano,

what do you mean with

Everything works except when I try to load a PR with type position PSTYP = 1 (Overall limit valued).

?

You got some return error? Or just the fields are not updated?

Do you implemented some BAdI or customer function on Purchase requisitions which can influence the behaviour?

I suggest you, as first step, to put a break point here where the extensions are managed

and here where you can catch some messages

and follow in debug the code to check what's going wrong.

Sadly, being custom fields, it's hard to replicate your scenario.


1.png (19.8 kB)
2.png (8.2 kB)
Show 7 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thank you Simone

I mean:

I put the value B into the field Item category of my file. In this case I can't value correctly the item quantity and the additional fields (date accural start date accural end) are non valued.

I put value space (defalut) into the same record of the same file and I can see the correct quantity and the dates are valued.

When i debug, the structures are correctly filled... and I have no error...

0

Hi Giuliano,

but i'm wrong or leaving the same field blank or filled with 'B' should be the same?

If in ME51N i leave empty

it's converted into B

1.png (3.9 kB)
2.png (16.7 kB)
3.png (6.2 kB)
0
Former Member
Simone Milesi

This is a Purchase requisition where I insert limits

When i put B the fields are non correctly valued

Thanx.

cattura1.png (32.2 kB)
0
Former Member
Former Member

I found out that the quantity, in this case, is always valued with 1 (It is the same in ME51N).

Remains the problem of additional fields not valued.

0

Ok, one down, one left :)

For the custom fields, did you debug the points i showed in my reply? It's in that point the extensionin are managed.

If you go step by step you should find why they are not filled.

You can also try with a watchpoint after the Z fields are filled to see where they are set blank.

0
Former Member
Simone Milesi

Hi Simone,

debugging in that point, the structures are correct and I don't have any error

I tried to use BAPI_PR_CHANGE to update those fields after creation of PR but the result is the same...

Maybe the solution is an update into EBKN...

Thanx!

catturax.png (26.3 kB)
0
Show more comments