cancel
Showing results for 
Search instead for 
Did you mean: 

KOK4 doesn't work as expected

Former Member
0 Kudos

HI,

I am using KOK4 to define a selection variant “A” for internal orders. The only selection criteria in the variant is order type “B”. When I use this selection variant in KOB1 as “order group” by entering “.B” it is working as expected.

If I choose order type “C” (there are no orders created with this order type C)  in the selection variant “A” and execute KOB1, the message GR 561 is raised “Set .A does not contain any entries”.

This is correct. Set “.A” is created during KOB1 runtime looking for orders with order type “C” but there are no orders.

But if I change selection variant “A” by selecting order type “C” AND one particular existing order number “D” (which is obviously created with another order type than C, but that shouldn’t matter), executing KOB1 with order group “.A” still raises GR561.

This is akward as there is one order master record (D) existing so the set cannot have ZERO entries but ONE entry.

Does anybody know how to correct this system behavior?

BR Christian

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Christian,

Just want to make sure I fully understand your issue.

You wrote that you create selection variant in KOK4.

Is it via clicking "Create" icon which takes you to OKOV?

You also wrote:

"I am using KOK4 to define a selection variant “A” for internal orders. The only selection criteria in the variant is order type “B”. When I use this selection variant in KOB1 as “order group” by entering “.B” it is working as expected."

Shouldn't it be ".A"?

Just want to be 100% sure I understand the issue.

System response is as per my understanding and expectation.

As you mentioned selection variants are used to dynamically create sets based on selections specified in OKOV.

Selection: AUART="C" AND  AUFNR="xxxxxx" returns no records so set ".A" has no records.

In other words, imagine if KOB1 had the same selection fields os OKOV. Would you expect any records retrieved forthis selection.

Regards,

Szymon

Former Member
0 Kudos

Dear Szymon, dear Big Choi,

guess I had a bad day when creating this posting...

You are right, it is an "AND" selection (as always...) thus selecting order type "C" and one particular order "D" with different order type will always create GR561.

Nevertheless the workaround was to select 2 order types, "B" and "E", E is just used to avoid GR561, it contains some orders bit they aren't used as account assignment.

Unfortunately I can only mark one answer as "correct".

BR Christian

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi..

If you input data as below picture, system understand that you can get internal order "AAAA" with order type “C”.