cancel
Showing results for 
Search instead for 
Did you mean: 

How to ignore SAP warning messages and continue untill warning messages end

trebor200
Explorer
0 Kudos

Hi, I am trying to record a script to remove confirmations on LTA's in ME38, these are confirmations that have been passed from SNC.

I can easily find the required line item and pull from an excel sheet to tell SAP what LTA to modify but as the confirmations are not consistent in each LTA, i.e. volume and cells there is not always the same number of error messages in each LTA.

I am looking for code to enter through or ignore these yellow error messages and then save the LTA.

First of all is it possible, if so I would be much appreciated if you can advise on this code.

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

script_man
Active Contributor
0 Kudos

Hi Dan,

please see the following link:

It could be that you can use it.

Regards,

ScriptMan

trebor200
Explorer
0 Kudos

Thanks for the reply ScriptMan, I have tried to use this but it seems it does not work. SAP expects you press enter. The amount of times you have to press enter differs from each material / LTA.

holger_khn
Contributor
0 Kudos

Hello.

you should check messagetype from Statusbar. If it's W then send 'Enter'. That should work. If it's not Working please share your Code and picture from screen where you expect send 'Enter'. Thanks.

Holger

trebor200
Explorer
0 Kudos

Hi Holger, Thanks for reply.

Having looked at the code again I do not think it is as straight forward as I first thought, the values I wish to delete are not always in the same columns and the script is hard coded to each cell. Unless it is possible to do an if function to say if cell is non editable move to next I think I may struggle.

It may be best I explain exactly what I am trying to achieve and you may know of another way to accomplish this.

ME38 Screen Item overview, confirmations

What I am trying to do is remove any values if they exist in Qty field, how I have managed to do this at the moment is use the ctrl Y and highlight cells and press delete, this then forces the error messages but when recording it is hardcoded to those cells that have values and editable.

Error messages that are appear are :

My current script is

trebor200
Explorer
0 Kudos
holger_khn
Contributor
0 Kudos

Hello.

THis can be done much smarter with Loop over line Table. Check If Field is changeable. If yes, remove Qty value field, send 'Enter' and Check next line. Until you reach end of Table.

If no, check nett line. If line is empty stop for this List.

have no Time today. When I have some Time I will try To adjust your Code.

trebor200
Explorer
0 Kudos

Ok Really appreciate any help on this, thanks.

holger_khn
Contributor
0 Kudos

Hello.

it will be helpful To have your Code als Text.

trebor200
Explorer
0 Kudos

Hiya, Please see below.

session.findById("wnd[0]").maximize session.findById("wnd[0]/tbar[0]/okcd").text = "/nme38" session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]/usr/ctxtRM06E-EVRTN").text = "h112776a" session.findById("wnd[0]/usr/ctxtRM06E-EVRTN").caretPosition = 8 session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]/usr/txtRM06E-EBELP").text = "10" session.findById("wnd[0]/usr/txtRM06E-EBELP").caretPosition = 2 session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]/usr/tblSAPMM06ETC_0222/ctxtRM06E-EVRTP[0,0]").setFocus session.findById("wnd[0]/usr/tblSAPMM06ETC_0222/ctxtRM06E-EVRTP[0,0]").caretPosition = 2 session.findById("wnd[0]").sendVKey 2 session.findById("wnd[0]/mbar/menu[3]/menu[4]/menu[0]").select session.findById("wnd[0]/usr/tblSAPLEINBTC_EKES/txtEKES-MENGE[4,5]").text = "" session.findById("wnd[0]/usr/tblSAPLEINBTC_EKES/txtEKES-MENGE[4,7]").text = "" session.findById("wnd[0]/usr/tblSAPLEINBTC_EKES/txtEKES-MENGE[4,8]").text = "" session.findById("wnd[0]/usr/tblSAPLEINBTC_EKES/txtEKES-MENGE[4,9]").text = "" session.findById("wnd[0]/usr/tblSAPLEINBTC_EKES/txtEKES-MENGE[4,10]").text = "" session.findById("wnd[0]/usr/tblSAPLEINBTC_EKES/txtEKES-MENGE[4,11]").text = "" session.findById("wnd[0]/usr/tblSAPLEINBTC_EKES/txtEKES-MENGE[4,12]").text = "" session.findById("wnd[0]/usr/tblSAPLEINBTC_EKES/txtEKES-MENGE[4,13]").text = "" session.findById("wnd[0]/usr/tblSAPLEINBTC_EKES/txtEKES-MENGE[4,14]").text = "" session.findById("wnd[0]/usr/tblSAPLEINBTC_EKES/txtEKES-MENGE[4,15]").text = "" session.findById("wnd[0]/usr/tblSAPLEINBTC_EKES/txtEKES-MENGE[4,0]").setFocus session.findById("wnd[0]/usr/tblSAPLEINBTC_EKES/txtEKES-MENGE[4,0]").caretPosition = 1 session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]").sendVKey 0 session.findById("wnd[0]/tbar[0]/btn[11]").press

trebor200
Explorer
0 Kudos

Hi holger ideas on this much appreciated