Register Login

ABAP Message with Variable

Updated May 18, 2018

Hello Experts,

Is there a way to get only a part of SAP message into a variable?
 
For example when it says "Purchase Order 1234567890 is created", I want to get "1234567890" into a global variable.


Comments

  • 05 May 2010 1:55 am Shalesh Singh Visen Helpful Answer

    Hello Aneesh 

    Set V[po_number] "&V[_message]" Search="Order" Variable po_number will contain 1234567890 in below example.

  • 05 May 2010 1:59 am Shalesh Singh Visen Helpful Answer

    Search will provide the string next to the characters that are searched. 

    Set V[variable] "Order number 89232 created" 

    In the above scenario, if we search for number, it will give the string next to the number which is 89232 

    So, 

    Set V[result] "&V[variable]" Search="number" // variable result will contain 89232 

    It is documented under "set" command.

  • 05 May 2010 1:59 am Shalesh Singh Visen
    What does the command "Search" do exactly?
    I can't find any info on the Synactive site.

×