cancel
Showing results for 
Search instead for 
Did you mean: 

Conditions tab vanishing in ME21N .

former_member220286
Participant
0 Kudos

me21n-after-removing-plant.jpgme21n-screenshot-afer-entering-plant.jpgDear All ,

I have a requirement that on creating Inter Unit Purchase Order

that is ZSPO .

As soon as I enter the plant corresponding to the material in item the condition tab is vanishing ( got hide ).

Moreover when I remove the plant then the condition tab again appear .

I have attached the screenshot of both the cases please check and guide .

How to resolve this problem .

Regards

Deep B

kiran_k8
Active Contributor
0 Kudos

Deep,

If you Debug, you will be able to find out.

K.Kiran.

former_member220286
Participant
0 Kudos

Dear Kiran ,

I have debugged it and but unable to found where exactly this condition tab is vanishing .

Not very much familiar with the module pool.


Actually what is happening is that on entering the plant also the free item indicator automatically getting checked and on the other hand the condition tab gets disappear immediately .


My requirement is that the condition tab does not vanished / dissapeared on entering the plant or any other input .It should remain there on me21n screen .


Also I can see that this BADI is already implemented : ZME_PROCESS_PO_CUST

In the method PROCESS_ITEM there are some code lines which I have mentioned below .


method IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM.

DATA : LS_POITEM TYPE MEPOITEM,
LS_POHEADER TYPE MEPOHEADER,
LS_PO_OBJ TYPE REF TO IF_PURCHASE_ORDER_MM.

"GETTING HEADER DATA
LS_PO_OBJ = IM_ITEM->GET_HEADER( ).
LS_POHEADER = LS_PO_OBJ->GET_DATA( ).

"GETTING ITEM DATA
LS_POITEM = IM_ITEM->GET_DATA( ).

IF LS_POHEADER-BSART EQ 'ZSTO' AND LS_POHEADER-BUKRS EQ '1000' .
LS_POITEM-FIPOS = 'DUMMY'.
CALL METHOD IM_ITEM->SET_DATA( LS_POITEM ).

ELSEIF LS_POHEADER-BSART EQ 'ZSTM' AND LS_POHEADER-BUKRS EQ '1000' .

LS_POITEM-FIPOS = 'DUMMY'.
CALL METHOD IM_ITEM->SET_DATA( LS_POITEM ).

ENDIF.


" For unchecking the Free Item indicator

IF LS_POHEADER-BSART EQ 'ZSPO' . " Inter unit purchase order
IF LS_POITEM-umson IS NOT INITIAL .

LS_POITEM-umson = space.

CALL METHOD IM_ITEM->SET_DATA( LS_POITEM ).
* EXPORTING
* im_data = ls_item.

ENDIF.


ENDIF.

endmethod.

For raising an error message for free item indicator I have written code lines in the method CHECK : -

BADI : ZME_PROCESS_PO_CUST

method IF_EX_ME_PROCESS_PO_CUST~CHECK.

DATA: ls_mepoheader TYPE mepoheader, " Header internal table " correct
IM_ITEM TYPE REF TO IF_PURCHASE_ORDER_MM,

lt_mepoitem TYPE purchase_order_items,
ls_mepoitem TYPE purchase_order_item,




ls_head TYPE REF TO if_purchase_order_mm,

ls_item TYPE mepoitem,

ls_local TYPE ttyp_fieldselection_mm,
ls_inval TYPE REF TO if_purchase_order_item_mm,
l_error TYPE c.

ls_mepoheader = IM_HEADER->get_data( ).
lt_mepoitem = IM_HEADER->get_items( ).


INCLUDE mm_messages_mac. "useful macros for message handling

IF ls_mepoheader-bsart = 'ZSPO'.

LOOP AT lt_mepoitem INTO ls_mepoitem.
ls_item = ls_mepoitem-ITEM->GET_DATA( ).

IF ls_item-umson IS NOT INITIAL .

ls_item-umson = space.
l_error = 'X'.

* CALL METHOD ls_mepoitem->SET_DATA( ls_item ).
*
CALL METHOD ls_mepoitem-item->SET_DATA( ls_item ).
* EXPORTING.
* im_data = ls_item.

ENDIF.
ENDLOOP.

IF l_error = 'X'.
ch_failed = 'X'.
mmpur_message_forced 'E' 'ME' '303' text-001 '' '' ''.
ENDIF.

ENDIF.
endmethod.

Above code lines are working fine for the raising of a error message to uncheck the free item indicator but it is not sufficient . My requirement is that the condition tab must not get dissapear on entering the plant .

Please check the screenshots which I have attached .Dear Gurus please suggest me some workaround or procedure to resolve this issue .

condition-tab-me21n.jpg

Regards

Deep B

inkedcondition-tab-dissapearing-me21n-on-entering.jpg


Accepted Solutions (0)

Answers (4)

Answers (4)

JL23
Active Contributor

I think you confused all by posting under the ABAP tag, as this is pure MM customizing

Check your customizing in OLME > Conditions > Define Price Determination Process > Define Schema Determination

check in step Determine Schema for Stock Transport Orders if you have a price schema assigned to document type UB

JL23
Active Contributor

If you do not expect an invoice then you cannot have conditions.

The screenshot "after entering plant" clearly shows that the box for invoice receipt is empty.

Further check whether the vendor has a plant assignment, see table T001W, remember the plant

Then check table t001k for both plants. They should have different company codes there, otherwise it is not intercompany, within the same company it is intracompany and usually a company cannot bill itself, hence no condition tab.

former_member220286
Participant
0 Kudos

Dear Jürgen L ,

You were right .

As you said that "vendor has a plant assignment, see table T001W, remember the plant"

I have done the same and have removed the plant assignment from the vendor .

So Now I again try to create the PO : me21n .Now what happened now is that on entering the plant the condition tab is not dissapearing now on removing the plant assignment from the vendor .

But I am unable to get your point in this scenario. If I again assign the plant to the vendor then again the condition tab gets disappeared .

So please guide now why it is working as such .

I have attached the screenshots.Please check .Please guide me what is the process scenario here .

Regards

Deep B


inkedvendor-screen-shot-purchasing-data-li.jpginkedme21n-now-condition-tab-not-dissapearing-li.jpg



JL23
Active Contributor
0 Kudos

If you want an intercompany process then the vendor has to have a plant assignment.

The point is that the company code of the ordering plant (plant in your PO item) must be different to the company code of the plant supplying plant (plant assigned to vendor in PO header)

You have not told if that is the case. I never told you to remove the plant assignment.

former_member220286
Participant
0 Kudos

Dear Jürgen L ,

Actually it is a standard nature that I need to bypass .

On entering the plant the condition tab is getting dissapear .

What my requirement is that the condition tab must not dissapear on entering the plant .

In my case vendor have a plant assignment .


I am unable to find that why the condition tab getting dissapeared on entering the plant .

Please guide .Any workaround or any procedure to find or bypass this functionality .




inkedcondition-tab-disappear-on-entering-plant-li.jpginkedcondition-tab-appear-li.jpg

Regards

Deep B

former_member220286
Participant
0 Kudos

Dear Jürgen L ,


Please guide .Some workaround or methods .


Anyone who can help in this issue .


Regards

Deep B




JL23
Active Contributor
0 Kudos

I told you to check your Check your customizing in OLME > Conditions > Define Price Determination Process > Define Schema Determination

You never came back to tell what you saw.

Is there no MM functional consultant who can help you? This is not an ABAP problem, this is pure customizing, there is nothing to do for an ABAPer.

former_member220286
Participant
0 Kudos

Dear Gurus ,

Please guide why the condition tab is vanishing on entering the plant .

Please provide some workaround .

Regards

Deep B

Pradeep_Reddy
Participant
0 Kudos

Hi Deep,

If it is STO, check configuration for schema is assigned for the plant or not. Condition tab disappear at the time of STO when no schema maintained for the plant

Determine Schema for Stock Transport Orders.

Regards,

Pradeep.