Problem getting check boxes and radio button to click with applescript

This is my script, it runs through without error, i can see the check box lightly flash like its being focused in on, but it wont actually check mark the box. it does this with all my check boxes and radio buttons.
tell application "Adobe InDesign CS3"
activate
end tell
tell application "System Events"
tell process "InDesign"
tell menu bar 1
click menu bar item 12
key code 125
key code 125
key code 124
key code 125
key code 125
key code 36
delay 1
end tell
tell window "Variable Links"
click checkbox "Use InDesign Tags Filter"
end tell
end tell
end tell

Hi craneium and welcome
For me this script fails, going through it step by step it seems confused, as I have highlighted out in the below code.
where is the window "Variable Links, may be I can help.
tell application "Adobe InDesign CS3"
activate
end tell
tell application "System Events"
tell process "InDesign"
tell menu bar 1
click menu bar item 12 --opens spotlight search in help
key code 125 -- highlights indesign help
key code 125 -- highlights welcome screen
key code 124 -- goes to apple
key code 125 -- goes to about this computer
key code 125 -- highlights software update
key code 36 -- starts software update
delay 1 -- ?
end tell
tell window "Variable Links" -- error cant get window variable links
click checkbox "Use InDesign Tags Filter"
end tell
end tell
end tell
Budgie

Similar Messages

  • How to put Check Boxes and Radio button in Smartforms

    Hi all,
    How to put check Box and radio button in Smartforms ............ from web properties there is an option to use. But How to use.     
    regards,
    Mohsin

    u can declare the checkboxes or radiobuttons whatever in driver program and pass the same to ur form...

  • Selection screen change with check box and radio buttons

    hi frieds
    i have an requirement that
    there is a check box in the selection screen and bydefault it has been check if it check the selection box shuld be disable
    if it uncheck the check box then selection block should enabled and in that againg two radion buttons are there. Bydefualt one radio button is enabled so that correspondng parameter is allow to enter input data. if i select the othere radio button the immeditely it allow the correpnding field entry and other radio button should be disabled with that field.
    please send the piece of code...
    regards
    vijay

    Hi,
    Use the event AT SELECTION-SCREEN OUTPUT.
    Here is an example:
    at selection-screen output.
      if gv_ucomm = 'RG1'.
        loop at screen.
          if pa_rgor = 'X'.
            if screen-name+7(1) = '2' or
               screen-name+7(1) = '1'.
              screen-input = 0.
            endif.
          endif.
          if pa_rgof = 'X'.
            if screen-name+7(1) = '1' or
               screen-name+7(1) = '3'.
              screen-input = 0.
            endif.
          endif.
          if pa_rgaa = 'X'.
            if screen-name+7(1) = '2' or
               screen-name+7(1) = '3'.
              screen-input = 0.
            endif.
          endif.
          modify screen.
        endloop.
      endif.

  • Check box or radio button to control image opacity and text field. javascript

    This is a little over head and skill set so I am reaching out to you fine people.
    I am using Adobe acrobat pro x
    I have radio buttons now but I can switch to check box if needed.
    What I need the Java script to do is...
    If Yes is checked then a text field labeled comments appears and an image labeled box changes the opacity to 100%.
    If No is checked then it does the opposite. Text field disappears and image goes to 0% opacity.

    This is the Adobe Reader forum.  You are more likely to receive a helpful answer if you ask in the appropriate Acrobat forum (e.g. Acrobat SDK).

  • Query :Chek box and radio buttons in smartforms

    Hi ,
    When we go to web properties in text . Thierwe find the entries the field name and dropp down down list with text , radiobutton , chek box Etc . .  I have tried to use it but it is not displaying any such radio button or chek box in smartform output .
    If somebody has used it before please tell me  how to use those things .
    Regards

    Hi,
    Ya so please go web properties of text field here u can find check box,
    radio button , hidden fields all the stuff u can use that one.
    Rewards points if it is useful.

  • Check boxes and ok button and displayed results, oh my!

    In a forms page, I have a report.
    I like to put check boxes next to the rows.
    Then when I click on an OK button it will display what I checked off, possibly on this same page.
    How do I create this concerted effect?

    Apex_item.checkbox will let you manually create check box. If it's a tabular form, you can add a row selector.
    e.g
    SELECT APEX_ITEM.CHECKBOX (30,
    NULL,
    NULL,
    'F30_' || LPAD (ROWNUM, 4, '0')
    )delete_checkbox FROM DUAL;
    You can only see the values where items are checked. So you may want to develop some logic to find out rows where items are not checked. Something similar to this
    FOR this IN 1 .. apex_application.g_f30.COUNT
    loop
    display(these values are checked);
    end loop;
    rest of the rows are unchecked.
    --Manish                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Add a new check box when a button is clicked?

    Hi ,
    I was trying to add a check box dynamically when a button is pressed.
    The check box contains title and a textbox for the user to enter data.
    For example , when the user hits addnew button , a new check box (title-name)
    with a textbox for entering name should appear on the form.
    Please give me any examples.
    Please help
    thanks

    here i m posting a similar code. just have a look at it and try it by yourself.
    str1="<select id=select"+ac+" name=select"+ac+">";
                        for(count1=0;count1<document.form1.select4.length;count1++){
                             str1 = str1 + "<option value='"+document.form1.select4.options[count1].value+"'>"+ document.form1.select4.options[count1].value  + "</option>"
    c[3].innerHTML= str1 + "</select>"     
    innerHTMLis userful for your requirement. and check somemore exaples like adding a row dynamically to a html page.
    Diablo

  • Only one check box or radio box

    I'm sorry i can't find this answer anywhere.
    If i want to ask a question in a form and provide two oppositie responses (Yes or No) using check boxes or radio buttons, how exactly do I do that? I saw various people referring to 'java' i have no idea where to put that or what java is required. I need specific answers please? Obviously in this case i need only one of the check boxes or radio buttons to be selected, i can't allow both to be selected.
    Your assistance is greatly appreciated

    Why use a checkbox?  Put radiobuttons on the form, you can set the button style to checkmark and they will be mutually exclusive.

  • Right-click doesn't work on select boxes, checkboxes & radio buttons. On other elements, there's no"Inspect Element" option

    After installing FF 6.0, right-click doesn't work on select boxes, checkboxes & radio buttons, i.e. nothing happens on right-clicking.
    The context-menu is available on other elements, but there's no"Inspect Element" option in the context-menu

    Regarding the two-button click: just go to the "Sytem Preferences --> Mouse" pop-op and under "One Finger", check the "Secondary Click" box.  Problem solved.  I don't know how I missed this the first 3 times I went to there.    Oh well.
    And as for why I had to change the Trackpad settings to get the Magic Mouse zoom feature to work (see original question): I'm still stumped.   Your guess is as good as mine.
    Hope this helps!
    Steve

  • Why am I getting black boxes and lines in Facebook chat area?

    I just installed the latest version of Firefox as well as the latest version of my graphics card drivers, and Adobe Flash Player. When I open Facebook, I get black boxes and lines all over the left side of the screen where my chat contacts are. I am wondering why this is happening and if there is a current fix to it, as it is rather annoying. When I hover my mouse next to or over the black boxes and lines, they move and continue to pop up elsewhere but only on the friends/chat area.

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • How to use Checkbox  and radio buttons in BI Reporting

    Hi BW Experts,
       My Client has given a report in ABAP format and the report has to be develop in BI.It contains Check boxes and the radio buttons. I don’t know how to use Checkboxes and radio buttons in Bex.For using this option, do we need to write a code in ABAP.Please help on this issue.
    Thanks,
    Ram

    Hi..
    Catalog item characteristic
    - Data element
    - Characteristic type
    Entry type
    List of catalog characteristics
    Designer
    Format (character)
    Standard characteristic
    Alternative: Master characteristic
    (used for automatic product
    assignment)
    Simple entry field
    Alternatives:
    Dropdown listbox or radio button
    list

  • How to hide check-in, check-out and publish buttons

    hi,
    i am new here and hope someone can help me:
    users of a community can edit some content items. they can open these items with this link (from administrators guide for al interaction publisher 6.5 p. 10-28):
    </pcs:value>/published_tools/content_item.jsp?&view=submit&ciid=<pcs:value expr="pcs_id"></pcs:value>" target="_blank"></a>
    the link works, users can edit the items.
    problem is, that i do not want to show the "publish button" to the users. the content item should be published automaticaly after the user clicks on "save". i also do not want users to see the check-in, check-out and preview buttons. they should just open a content item (+ simultaneously check-out), edit it and save it (+ simultaneously check-in and publish and close the content editor).
    i thought this can be done by the "view" parameter, but nothing happens if i use it. any ideas?
    thx
    volker
    Edited by: vhspec on 03.06.2009 00:58

    Hi vhspec,
    This is a common problem. A creative way to solve the problem is to point yourself to the description field of each input on a data entry template. When you have the need to make any dynamic changes to the entry templates simply drop some javascript into the description field of an input and write the appropriate javascript code to either hide buttons, change behaviour etc. When the data entry template is displayed to a user the javascript in the description field will be executed by the browsing. Fortunately publisher does not check the description fields or encode them so you can get away with a lot.
    The only problem with this approach is while you are altering the UI the underlying data model will still allow users to publish. So if an unauthorised user saw fit, they could publish content.
    Have you considered creating a workflow so that users in specific groups cannot publish? that way only a controller down the line would be able to approve and publish.
    Edited by: user8023716 on Jun 9, 2009 2:55 AM

  • How to realize Checkbox and Radio Buttons based on Attributes in JHeadstart

    Hy@ all,
    I try to redevelop the Summit Forms Demo in ADF.
    The module "ORDER" contains, among other things, a checkbox and radio buttons based on database columns(VARCHAR2).
    The column(checkbox) named PAYMENT_TYPE contains the values CASH and CREDIT and the column(radio button) called ORDER_FILLED contains the values Y and N.
    After creating the business components, I set in JHeadstarts Application Definition the Display Type of these two attributes to checkBox and radio-horizontal.
    I created a dymanic domain for the radio-horizontal and a static domain for the checkBox.
    The radio-horizontal within the dymanic domain works nearly correct.
    I set the Data Collection in this dynamic domain to the required Group and the Value and Meaning Attribute to the necessary Attribute.
    Within the JSF- Page the values are shown right but unfortunately there are too many radio buttons available. Instead of displaying the two radio buttons CASH and CREDIT were many CASH and CREDIT radio buttons shown.
    I can´t find any solution for this case.
    The problem with the checkBox is that therfore a static domain is required but I want to show the value of the checkBox based on the described attribute, like the handling of the radio horizontal.
    But I don´t know how to implement this, if it is possible.
    I´m using JHeadstart v10.1.3.2 and I´m pleased about any reply or solution.
    Best regards
    Chris

    Chris,
    If you run the application module tester, and query the view object usage underlying your dynamic domain, how many rows does it return? It should return only two rows, one for CASH and one for CREDIT. If more than two rows are returned, your query is wrong.
    What is the problem with using a static domain for the checkbox?
    Steven Davelaar,
    JHeadstart Team.

  • How to get check box in alv output

    hi gurus
    can anyone explian me how to get check box in alv output
    it should not be a pop up window
    i want to get in output itself
    tahnk you
    regards
    kals.

    Hi
    by using rs_selfield
    ty to call dynamic subroutine..
    FORM user_command USING r_ucomm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield. "#EC CALLED
    read table rs-selfield with key cond = 'X'
    endform.
    see the below example
    REPORT Z_GET_REFRESH no standard page heading.
    type-pools : slis.
    tables : makt,
    mara.
    data : i_fieldcat type slis_t_fieldcat_alv.
    CONSTANTS :
    gc_refresh TYPE syucomm VALUE '&REFRESH'.
    data : begin of i_makt occurs 0,
    matnr like makt-matnr,
    maktx like makt-maktx,
    end of i_makt.
    data : v_repid like sy-repid,
    g_user_command type slis_formname value 'USER_COMMAND',
    g_status_set type slis_formname value 'SET_PF_STATUS',
    lt_event_exit TYPE slis_t_event_exit,
    ls_event_exit TYPE slis_event_exit.
    DATA:LC_GLAY TYPE LVC_S_GLAY.
    select-options s_matnr for mara-matnr .
    start-of-selection.
    select matnr maktx from makt into table i_makt
    where matnr in s_matnr.
    end-of-selection.
    Fill the fieldcatlog
    perform fill_field.
    Call the FM
    perform call_fm.
    *& Form fill_field
    text
    --> p1 text
    <-- p2 text
    FORM fill_field.
    data wa_fieldcat type slis_fieldcat_alv.
    clear : wa_fieldcat.
    wa_fieldcat-tabname = 'I_MAKT'.
    wa_fieldcat-fieldname = 'MATNR'.
    wa_fieldcat-outputlen = '18'.
    wa_fieldcat-seltext_l = 'Material #'.
    wa_fieldcat-col_pos = '1'.
    append wa_fieldcat to i_fieldcat.
    clear : wa_fieldcat.
    wa_fieldcat-tabname = 'I_MAKT'.
    wa_fieldcat-fieldname = 'MAKTX'.
    wa_fieldcat-outputlen = '40'.
    wa_fieldcat-seltext_l = 'Material Desc'.
    wa_fieldcat-col_pos = '2'.
    append wa_fieldcat to i_fieldcat.
    ENDFORM. " fill_field
    *& Form call_fm
    text
    --> p1 text
    <-- p2 text
    FORM call_fm.
    v_repid = sy-repid.
    LC_GLAY-EDT_CLL_CB = 'X'.
    CLEAR ls_event_exit.
    ls_event_exit-ucomm = gc_refresh. " Refresh
    ls_event_exit-after = 'X'.
    APPEND ls_event_exit TO lt_event_exit.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE = ' '
    I_CALLBACK_PROGRAM = v_repid
    I_CALLBACK_PF_STATUS_SET = g_status_set
    I_CALLBACK_USER_COMMAND = g_user_command
    I_CALLBACK_TOP_OF_PAGE = ' '
    I_CALLBACK_HTML_TOP_OF_PAGE = ' '
    I_CALLBACK_HTML_END_OF_LIST = ' '
    I_STRUCTURE_NAME =
    I_BACKGROUND_ID = ' '
    I_GRID_TITLE =
    I_GRID_SETTINGS = LC_GLAY
    IS_LAYOUT =
    IT_FIELDCAT = i_fieldcat
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
    IT_SORT =
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    I_SAVE = ' '
    IS_VARIANT =
    IT_EVENTS =
    IT_EVENT_EXIT = lt_event_exit
    IS_PRINT =
    IS_REPREP_ID =
    I_SCREEN_START_COLUMN = 0
    I_SCREEN_START_LINE = 0
    I_SCREEN_END_COLUMN = 0
    I_SCREEN_END_LINE = 0
    IT_ALV_GRAPHICS =
    IT_ADD_FIELDCAT =
    IT_HYPERLINK =
    I_HTML_HEIGHT_TOP =
    I_HTML_HEIGHT_END =
    IT_EXCEPT_QINFO =
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    TABLES
    T_OUTTAB = i_makt
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. " call_fm
    FORM USER_COMMAND *
    FORM user_command USING r_ucomm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield. "#EC CALLED
    data i_RSPARAMS like RSPARAMS occurs 0.
    CASE R_UCOMM.
    WHEN '&IC1'.
    read table i_makt index rs_selfield-tabindex.
    SET PARAMETER ID 'MAT' FIELD i_makt-matnr.
    if not i_makt-matnr is initial.
    call transaction 'MM02' and skip first screen.
    endif.
    when '&REFRESH'.
    CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
    EXPORTING
    CURR_REPORT = v_repid
    IMPORTING
    SP =
    TABLES
    SELECTION_TABLE = i_RSPARAMS
    EXCEPTIONS
    NOT_FOUND = 1
    NO_REPORT = 2
    OTHERS = 3
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    submit z_get_refresh with selection-table i_RSPARAMS.
    rs_selfield-refresh = 'X'.
    ENDCASE.
    MOVE '&REFRESH' TO r_ucomm.
    ENDFORM.
    FORM set_pf_status *
    FORM SET_PF_STATUS USING rt_extab TYPE slis_t_extab.
    DELETE Rt_extab WHERE fcode = gc_refresh.
    SET PF-STATUS 'STANDARD_FULLSCREEN' OF PROGRAM 'SAPLKKBL'
    EXCLUDING Rt_extab.
    *SET PF-STATUS 'STANDARD' EXCLUDING rt_extab.
    SET TITLEBAR sy-tcode.
    ENDFORM.

  • How to get check box in alv grid list output

    hi gurus,
    can anyone inform me
    how to get check box in alv output it should not be a pop up window
    thank you
    regards
    kals.

    or
    hi go through the fallowing code.
    code*&----
    *& Report YGS_ALV_BOM *
    REPORT YGS_ALV_BOM .
    TABLES : MAST,STKO,STPO.
    TYPE-POOLS: SLIS.
    TYPES : BEGIN OF TY_MAST,
    CHECK_BOX,
    MATNR TYPE MAST-MATNR,
    WERKS TYPE MAST-WERKS,
    STLAN TYPE MAST-STLAN,
    STLNR TYPE MAST-STLNR,
    STLAL TYPE MAST-STLAL,
    END OF TY_MAST.
    TYPES : BEGIN OF TY_STKO,
    STLTY TYPE STKO-STLTY,
    STLNR TYPE STKO-STLNR,
    STLAL TYPE STKO-STLAL,
    STKOZ TYPE STKO-STKOZ,
    BMENG TYPE STKO-BMENG,
    BMEIN TYPE STKO-BMEIN,
    END OF TY_STKO.
    TYPES : BEGIN OF TY_STPO,
    LIGHTS,
    STLTY TYPE STPO-STLTY,
    STLNR TYPE STPO-STLNR,
    STLKN TYPE STPO-STLKN,
    STPOZ TYPE STPO-STPOZ,
    IDNRK TYPE STPO-IDNRK,
    MENGE TYPE STPO-MENGE,
    MEINS TYPE STPO-MEINS,
    END OF TY_STPO.
    DATA : IT_MAST TYPE TABLE OF TY_MAST,
    WA_MAST TYPE TY_MAST,
    IT_STKO TYPE TABLE OF TY_STKO,
    WA_STKO TYPE TY_STKO,
    IT_STPO TYPE TABLE OF TY_STPO,
    WA_STPO TYPE TY_STPO.
    DATA : lt_fieldcat TYPE slis_t_fieldcat_alv,
    ls_layout TYPE slis_layout_alv,
    ls_event TYPE slis_alv_event,
    lt_event TYPE slis_t_event,
    it_sortinfo type slis_t_sortinfo_alv,
    ls_header TYPE slis_listheader,
    lt_header TYPE slis_t_listHEADER.
    DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    SELECT-OPTIONS : S_MATNR FOR MAST-MATNR.
    START-OF-SELECTION.
    PERFORM GET_DATA.
    PERFORM BUILD_FIELDCAT USING LT_FIELDCAT.
    PERFORM BUILD_LAYOUT.
    END-OF-SELECTION.
    PERFORM DISPLAY_DATA.
    *& Form GET_DATA
    text
    --> p1 text
    <-- p2 text
    form GET_DATA .
    REFRESH : IT_MAST.
    SELECT MATNR
    WERKS
    STLAN
    STLNR
    FROM MAST
    INTO CORRESPONDING FIELDS OF TABLE IT_MAST
    WHERE MATNR IN S_MATNR.
    endform. " GET_DATA
    *& Form BUILD_FIELDCAT
    text
    --> p1 text
    <-- p2 text
    form BUILD_FIELDCAT USING LT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA : L_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    REFRESH : LT_FIELDCAT.
    L_FIELDCAT-COL_POS = 1.
    L_FIELDCAT-FIELDNAME = 'MATNR'.
    L_FIELDCAT-TABNAME = 'IT_MAST'.
    L_FIELDCAT-REF_FIELDNAME = 'MATNR'.
    L_FIELDCAT-REF_TABNAME = 'MAST'.
    APPEND L_FIELDCAT TO LT_FIELDCAT.
    L_FIELDCAT-COL_POS = 2.
    L_FIELDCAT-FIELDNAME = 'WERKS'.
    L_FIELDCAT-TABNAME = 'IT_MAST'.
    L_FIELDCAT-REF_FIELDNAME = 'WERKS'.
    L_FIELDCAT-REF_TABNAME = 'MAST'.
    APPEND L_FIELDCAT TO LT_FIELDCAT.
    L_FIELDCAT-COL_POS = 3.
    L_FIELDCAT-FIELDNAME = 'STLNR'.
    L_FIELDCAT-TABNAME = 'IT_MAST'.
    L_FIELDCAT-REF_FIELDNAME = 'STLNR'.
    L_FIELDCAT-REF_TABNAME = 'MAST'.
    APPEND L_FIELDCAT TO LT_FIELDCAT.
    endform. " BUILD_FIELDCAT
    *& Form BUILD_LAYOUT
    text
    --> p1 text
    <-- p2 text
    form BUILD_LAYOUT .
    CLEAR LS_LAYOUT.
    LS_LAYOUT-BOX_FIELDNAME = 'CHECK_BOX'.
    LS_LAYOUT-BOX_TABNAME = 'IT_MAST'.
    endform. " BUILD_LAYOUT
    *& Form DISPLAY_DATA
    text
    --> p1 text
    <-- p2 text
    form DISPLAY_DATA .
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE = ' '
    I_CALLBACK_PROGRAM = SY-REPID
    I_CALLBACK_PF_STATUS_SET = 'PF_STATUS'
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    I_STRUCTURE_NAME =
    IS_LAYOUT = LS_LAYOUT
    IT_FIELDCAT = LT_FIELDCAT
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
    IT_SORT =
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    I_SAVE = ' '
    IS_VARIANT =
    IT_EVENTS =
    IT_EVENT_EXIT =
    IS_PRINT =
    IS_REPREP_ID =
    I_SCREEN_START_COLUMN = 0
    I_SCREEN_START_LINE = 0
    I_SCREEN_END_COLUMN = 0
    I_SCREEN_END_LINE = 0
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    TABLES
    t_outtab = IT_MAST
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endform. " DISPLAY_DATA
    FORM PF_STATUS USING RT_EXTAB TYPE SLIS_T_EXTAB.
    SET PF-STATUS 'YSTATUS' OF PROGRAM SY-REPID
    EXCLUDING RT_EXTAB.
    ENDFORM.
    FORM USER_COMMAND USING RF_UCOMM TYPE SY-UCOMM
    SELFIELD TYPE SLIS_SELFIELD.
    CASE RF_UCOMM.
    WHEN '&NEXT'.
    PERFORM GET_DATA_BOM .
    PERFORM BUILD_FIELDCAT_BOM USING LT_FIELDCAT.
    PERFORM BUILD_LAYOUT_BOM.
    PERFORM DISPLAY_DATA_BOM.
    ENDCASE.
    ENDFORM.
    *& Form GET_DATA_BOM
    text
    --> p1 text
    <-- p2 text
    form GET_DATA_BOM .
    CLEAR : WA_STPO,
    WA_MAST.
    REFRESH : IT_STPO.
    DATA : IT_CHECK TYPE TABLE OF TY_MAST.
    LOOP AT IT_MAST INTO WA_MAST.
    IF WA_MAST-CHECK_BOX EQ 'X'.
    APPEND WA_MAST TO IT_CHECK.
    ENDIF.
    ENDLOOP.
    SELECT STLTY
    STLNR
    STLKN
    VGKNT
    IDNRK
    MENGE
    MEINS
    FROM STPO
    INTO CORRESPONDING FIELDS OF TABLE IT_STPO
    FOR ALL ENTRIES IN IT_CHECK
    WHERE IDNRK EQ IT_CHECK-MATNR.
    CLEAR WA_STPO.
    LOOP AT IT_STPO INTO WA_STPO.
    SELECT SINGLE * FROM MAST WHERE MATNR EQ WA_STPO-IDNRK.
    IF SY-SUBRC = 0.
    WA_STPO-LIGHTS = '2'.
    ELSE.
    WA_STPO-LIGHTS = '1'.
    ENDIF.
    MODIFY IT_STPO FROM WA_STPO.
    ENDLOOP.
    endform. " GET_DATA_BOM
    *& Form BUILD_FIELDCAT_BOM
    text
    --> p1 text
    <-- p2 text
    form BUILD_FIELDCAT_BOM USING LT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA : L_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    REFRESH : LT_FIELDCAT.
    L_FIELDCAT-COL_POS = 1.
    L_FIELDCAT-FIELDNAME = 'STLTY'.
    L_FIELDCAT-TABNAME = 'IT_STPO'.
    L_FIELDCAT-REF_FIELDNAME = 'STLTY'.
    L_FIELDCAT-REF_TABNAME = 'STPO'.
    APPEND L_FIELDCAT TO LT_FIELDCAT.
    L_FIELDCAT-COL_POS = 2.
    L_FIELDCAT-FIELDNAME = 'STLNR'.
    L_FIELDCAT-TABNAME = 'IT_STPO'.
    L_FIELDCAT-REF_FIELDNAME = 'STLNR'.
    L_FIELDCAT-REF_TABNAME = 'STPO'.
    APPEND L_FIELDCAT TO LT_FIELDCAT.
    L_FIELDCAT-COL_POS = 3.
    L_FIELDCAT-FIELDNAME = 'STLKN'.
    L_FIELDCAT-TABNAME = 'IT_STPO'.
    L_FIELDCAT-REF_FIELDNAME = 'STLKN'.
    L_FIELDCAT-REF_TABNAME = 'STPO'.
    APPEND L_FIELDCAT TO LT_FIELDCAT.
    L_FIELDCAT-COL_POS = 4.
    L_FIELDCAT-FIELDNAME = 'IDNRK'.
    L_FIELDCAT-TABNAME = 'IT_STPO'.
    L_FIELDCAT-REF_FIELDNAME = 'IDNRK'.
    L_FIELDCAT-REF_TABNAME = 'STPO'.
    APPEND L_FIELDCAT TO LT_FIELDCAT.
    L_FIELDCAT-COL_POS = 5.
    L_FIELDCAT-FIELDNAME = 'MENGE'.
    L_FIELDCAT-TABNAME = 'IT_STPO'.
    L_FIELDCAT-REF_FIELDNAME = 'MENGE'.
    L_FIELDCAT-REF_TABNAME = 'STPO'.
    APPEND L_FIELDCAT TO LT_FIELDCAT.
    endform. " BUILD_FIELDCAT_BOM
    *& Form BUILD_LAYOUT_BOM
    text
    --> p1 text
    *<-- p2 text
    form BUILD_LAYOUT_BOM .
    CLEAR : LS_LAYOUT.
    LS_LAYOUT-LIGHTS_FIELDNAME = 'LIGHTS'.
    LS_LAYOUT-LIGHTS_TABNAME = 'IT_STPO'.
    endform. " BUILD_LAYOUT_BOM
    *& Form DISPLAY_DATA_BOM
    text
    --> p1 text
    <-- p2 text
    form DISPLAY_DATA_BOM .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER = ' '
    I_BUFFER_ACTIVE = ' '
    I_CALLBACK_PROGRAM = SY-REPID
    I_CALLBACK_PF_STATUS_SET = ' '
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND_BOM'
    I_CALLBACK_TOP_OF_PAGE = 'TOP9'
    I_CALLBACK_HTML_TOP_OF_PAGE = ' '
    I_CALLBACK_HTML_END_OF_LIST = ' '
    I_STRUCTURE_NAME =
    I_BACKGROUND_ID = 'ALV_BACKGROUND'
    I_GRID_TITLE =
    I_GRID_SETTINGS =
    IS_LAYOUT = LS_LAYOUT
    IT_FIELDCAT = LT_FIELDCAT
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
    IT_SORT =
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    I_SAVE = ' '
    IS_VARIANT =
    IT_EVENTS =
    IT_EVENT_EXIT =
    IS_PRINT =
    IS_REPREP_ID =
    I_SCREEN_START_COLUMN = 0
    I_SCREEN_START_LINE = 0
    I_SCREEN_END_COLUMN = 0
    I_SCREEN_END_LINE = 0
    IT_ALV_GRAPHICS =
    IT_HYPERLINK =
    IT_ADD_FIELDCAT =
    IT_EXCEPT_QINFO =
    I_HTML_HEIGHT_TOP =
    I_HTML_HEIGHT_END =
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    TABLES
    t_outtab = IT_STPO
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endform. " DISPLAY_DATA_BOM
    FORM TOP9 .
    CLEAR LS_HEADER.
    REFRESH LT_HEADER.
    LS_HEADER-TYP = 'H'.
    LS_HEADER-INFO = 'BILL OF MATERIALS'.
    APPEND LS_HEADER TO LT_HEADER.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = LT_HEADER
    I_LOGO = 'ENJOYSAP_LOGO'
    I_END_OF_LIST_GRID =
    ENDFORM.
    FORM USER_COMMAND_BOM USING RF_UCOMM_BOM LIKE SY-UCOMM
    SEL_FIELD TYPE SLIS_SELFIELD.
    CASE RF_UCOMM_BOM.
    WHEN '&IC1'.
    SET PARAMETER ID 'MAT' FIELD WA_STPO-IDNRK.
    SET PARAMETER ID 'WRK' FIELD WA_MAST-WERKS.
    SET PARAMETER ID 'CSA' FIELD WA_MAST-STLAN.
    CALL TRANSACTION 'CS03' AND SKIP FIRST SCREEN.
    ENDCASE.[/code]

Maybe you are looking for

  • Time Machine problem after restoring to a new HD (after my original HD failed)

    I am running Lion 10.7.5 on a MacBook Pro Late '11 My HD was getting SMART errors, so I did a complete back up using Time Machine using a WD My Passport 1TB external, and then sent my MBP to Apple for HD replacement (under my Applecare plan). I colle

  • Help with Coversion Software

    Just bought a new 60Gig.I have Nero Recode 2. It will convert DVD to MPEG-4 and it will play with Nero software. When I import to iTunes it is pixelated and audio and video are not in sync. Sorry if this has already been answered I went back and look

  • LR2 White balance presets

    What happened to all the white balance presets (cloudy, shade, tungsten, etc)? I just installed LR2 (on Win XP SP2) and the only presets available on the drop down menu are As Shot, Auto and Custom. Have the others been eliminated in LR2?

  • Af:table range change

    Hi I have a table which has 200+ records displaying 20 records perpage. I am setting the values to that table from my backing bean. The problem is that, When ever the range is changed, the next 20 records are displayed but the request doesnot seem to

  • Adobe suite downloaded but Acrobat was not downloaded with it

    Ok so I know it is a common problem that acrobat X pro doesn't get downloaded properly but i did the acrofix and I got exit code 5. I googled what this is (and there aren't many responses) but when i found someone else asking the question they were t