Friday, April 20, 2018

Application with Internal Table

Having screen painter with layout fields are vender, name, city operations.
  • Select "SE80" -> Edit object
  • Select program -> provide module pool. Program creating "Zvender-Demo-PG".
  • Select create -> Uncheck "Include" -> Enter.
  • Maintain Attributes to program -> Save Attributes.
  • Select SE80 -> Edit object -> Select program.
    "Zvender -> Demo -> PG".
  • Select screen -> enter screen number to design application screen "100".
  • Select create to switch over to screen painter.
  • Description to screen 100 "Application with Internal table" -> Save.
  • Select "Layout" from screen painter.
  • Select "Go to" -> Secondary Window -> Dictionary/Program fields to select fields from table
  • Enter table "LFA1" --> Enter.
  • Select Fields LIFNR ,NAME1 & ORT01.
  • Drop it in Layout.
  • Maintain operatoions Display & Exit -->Save.
  • Select "Flow logic' from screen painter.
  • Select "PAI" from Flow Logic -> Select it's module.
  • Double click on that module -> Enter.
  • Select main program ->Enter.
  • Tables work area
    Tables : LFAI.
  • Internal Table as per fields in Layout. Types : Begin of Fs,
    LIFNR Type LIFNR,
    Namel Type namel-Gp,
    ORTAL type ORTAL-GP,
    End of FS.
    Data : WA type FS,
    ITab type standard Table of FS.
  • Select module - end module of input.
  • Logic for operations.
    case sy-ucomm.
    when 'Display'.
    Select LIFNR
    Name1
    ORT01
    From LFA1
    Into Table ITAB
    Where LIFNR = LFA1-LIFNR
    when 'Exit'
    Leave program.
    End case.
  • Select "PRO" from Flow magic ->Delete comment to it's module.
  • Double click on that module ->Enter.
  • Select "Main Progrm"->Enter.
  • Select module - End module of "PBO".
  • Logic to transfer data from body to screen field via work area
    If not ITAB[ ] is initial.
    Loop at ITAB[ ] into WA.
    Move corresponding WA to LFA1.
    End Loop.
    End If.
  • Move - corresponding is syntax. Here LFA1 is not table name it's screen field.
  • Save & Activate -> F3-> Activate.
  • Select SE80 ->Edit object ->Select mode.
  • Provide Transaction code creating.
    "Zvendar_Demo_PG_TR" ->Create.
  • Short text "Demo".
  • Select "Dialog Transaction" ->Enter.
  • Provide module pool program "Zvendar_Demo_PG".
  • Screen number "0100" ->Save.
  • No comments:

    Post a Comment

    Application with Internal Table

    Having screen painter with layout fields are vender, name, city operations. Select "SE80" -> Edit object Select program ->...