Skip to Content
avatar image
Former Member

SAPSCRIPT: Initial value

Hi Guys. Im new to sap script and im having a porblem: How do you check if a value is initial?

Im trying to display text and a table field (REGUD-SWRBT) if REGUP-UMSKZ is initial.

Any help appreciated.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Dec 19, 2011 at 01:30 PM

    Hello Mike,

    try this:

    Dim FMName
    'This is an example for TAC SE37
    'session.findById("wnd[0]/tbar[0]/okcd").text = "/nse37"
    'session.findById("wnd[0]/tbar[0]/btn[0]").press
    'Field function module name
    Set FMName = session.findById("wnd[0]/usr/ctxtRS38L-NAME")
    'Set FMName = session.findById("wnd[0]/usr/ctxtREGUP-UMSKZ") '< Your field name
    If Trim(FMName.text) = "" Then
      FMName.text = "RFC_PING"
    Else
      MsgBox "FM-Name is " & FMName.text  
    End If
    

    Hope it helps.

    Cheers

    Stefan

    Add comment
    10|10000 characters needed characters exceeded