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: 

Custom messages are not displaying in LTOG transaction

Former Member
0 Kudos
503

Hi Experts,

               I am unable to display the custom messages in LT0G tcode, In LTOG i am selecting unlocked line item and click on  the return to stock it will triggering the badi LE_SHP_DELIVERY_PROC there i wrote the Custom error  message ,the message is executing but it is not displaying.

Please give the suggestions on that.

Regards,

Suresh.

11 REPLIES 11

former_member192467
Active Participant
0 Kudos
464

Hi,

There may be some other message appearing after the custom message. Try to put a debugging breakpoint at statement MESSAGE.

Regards,

Renjith

0 Kudos
464

Hi Renjith,

Thank you very much  for your kind reply..

I was implemented below code in that badi(LE_SHP_DELIVERY_PROC).

IF sy-tcode = 'LT03' OR sy-tcode = 'LT0G'.
SELECT matnr charg vfdat FROM mch1 INTO TABLE it_exp.
LOOP AT IT_YVBUP INTO W_YVBUP.
LOOP AT it_xlips INTO wa_xlips WHERE VBELN EQ W_YVBUP-VBELN AND POSNR EQ W_YVBUP-POSNR.
IF wa_xlips-bwart EQ '601' OR wa_xlips-bwart = '641' OR wa_xlips-bwart = '643' or wa_xlips-bwart = '850'.

READ TABLE it_exp INTO wa_exp WITH KEY matnr = wa_xlips-matnr charg = wa_xlips-charg.
IF sy-subrc EQ 0.
IF wa_exp-vfdat < sy-datum AND wa_exp-vfdat IS NOT INITIAL.
mat_no
= wa_xlips-matnr.
batch_no
= wa_xlips-charg.
SHIFT mat_no LEFT DELETING LEADING '0'.

v_dat
= wa_exp-vfdat+0(4).
v_dat2
= wa_exp-vfdat+4(2).
v_dat3
= wa_exp-vfdat+6(2).
shift wa_xlips-vbeln LEFT DELETING LEADING '0'.
shift wa_xlips-posnr LEFT DELETING LEADING '0'.
CONCATENATE v_dat2 v_dat3 v_dat INTO v_date SEPARATED BY '/'.
CONCATENATE 'DO' wa_xlips-vbeln '#' wa_xlips-posnr 'Material' mat_no ' and Batch' batch_no 'Expired' '(' v_date ')' INTO final_msg SEPARATED BY space.
MESSAGE final_msg TYPE 'E'.
CLEAR:wa_exp.
ENDIF.
ENDIF.
ENDIF.

CLEAR:wa_xlips.
ENDLOOP.
ENDLOOP.
ENDIF.

The above code display error messages incase of LT03 correctly,But n't getting incase of LT0G.

Please help me regarding on this..

Regards,

Suresh.

0 Kudos
464

Hi,

Please check if during runtime the sy-tcode is appearing as 'LT0G'.

Also, instead of raising the message inside loop, capture the message text to an itab, and after the loops if the itab is not initial trigger the message.

like..

loop at itab..

if condition fails

append message ti it_message

exit.

endif..

endloop.

if it_message is not initial.

error messages as a pop up table

exit

endif

0 Kudos
464

I hope this is not the real code as


SELECT matnr charg vfdat FROM mch1 INTO TABLE it_exp.

will raise some performance problem?

Also in which method did you raise this error message, e.g. in DELIVERY_FINAL_CHECK messages must be appended to CT_FINCHDEL itab...

Regards,

Raymond

0 Kudos
464

Hi Raymond,

Thank you very much for your kind reply..

I was implemented above code in DELIVERY_FINAL_CHECK method only. I am inserting Custom error message CT_FINCHDEL internal table  because of it is hashed internal table. Even though i am facing the same problem.


Please help me regarding on this..


Regards,

Suresh.

0 Kudos
464

Is your code similar to


IF sy-subrc NE 0.                            " your test

  CLEAR ls_finchdel.

  ls_finchdel-vbeln   = <ls_xlikp>-vbeln.   " order number

  ls_finchdel-pruefung = '99'.               " customer check

  ls_finchdel-msgty   = 'E'.                " error

  ls_finchdel-msgid   = 'ZCLASS'.           " message class

  ls_finchdel-msgno   = '123'.              " message number

  INSERT ls_finchdel INTO TABLE ct_finchdel. " hashed table

ENDIF.

Else did you activate the implementation and every wsorkbench related object

Else start debug?

Regards,

Raymond

0 Kudos
464

Hi Raymond,


  Thank you very much for your kind reply..

I have done as above you specified , In internal table i am getting error messages and  while populating custom error  messages,the message statement is also executing  but not displaying the message.

Please help me regarding on this..

Regards,

Suresh.

0 Kudos
464

Hi Renjith,


  Thank you very much for your kind reply..

I have done as above you specified , In internal table i am getting error messages and  while populating custom error  messages,the message statement is also executing  but not displaying the message.

Please help me regarding on this..

Regards,

Suresh.

0 Kudos
464

Hi,

If you are appending the messages to CT_FINCHDEL, then the documents with status E will not be posted and you can see the messages in LOG.

But if the message has to be shown other than log then you can display the error tab  as a pop up using FM ADA_POPUP_WITH_TABLE .

Regards,

Renjith

0 Kudos
464

Hi Renjith,

Could you please suggest how to check the error logs.?

Regards,

Suresh

0 Kudos
464

Please, remove (comment) the message statement that break the process...