How to refer rectangle box in my program?

I have to do some code migration from 16 bit Apps (Forms on
Win3.1) to 32 bit apps(Forms on WinNT).For this migration i made
a form for generation all the form in one shot . it's working
fine. but it's giving me scroll bar in each form. we used
rectangle box in most of the form and as u know i can not reffer
rectangle box in programming.so i am not able to resize that. Is
there any way so that i can refer that object programatically and
can resize it.
null

Hi,
Sorry but i don' t understand what you've written, if
my executable jar is named
myexecutablejar.jar and the jar that i would
like to put in in order to work is named
jdic.jar what would be the command?
Thanks for your precision.Is this clearer?
jar cvf myexecutablejar your-classes path-of-jdic.jar

Similar Messages

  • How is the rectangle box around my curser disengaged?

    How is the rectangle box around my curser disengaged? I looked in Sys Prefs to no avail; otherwise, ML is so excellent in every way...
    Thank you for your time, Lisa

    Go to accesibility in sys prefes  then go to zoom and zoom style, change that to fullscreen.

  • Copying text from excel table in PDF, pastes rectangle boxes into other programs.

    Adobe acrobat X Std.
    I have a PDF file with text, graphics and an excel table in it.
    I add comments to the PDF file and reprint it to a new PDF file.
    In the new file I cannot select text from the excel table and paste it into anything.
    When I paste into word or other programs I get rectangle boxes.
    If I go to the original PDF I the text copies just fine.
    Any ideas would be great.

    Here is a video!!
    http://www.youtube.com/watch?v=J3CJfBlZuW0
    Adobe illustrator CS3, M/S Excel 2003, HWP 2002(Korean Wordprocess),
    Macro Keyboard, script, Action ...

  • How to reference the rectangle box object in my code?

    I have to do some code migration from 16 bit Apps (Forms on
    Win3.1) to 32 bit apps(Forms on WinNT).For this migration i made
    a form for generation all the form in one shot . it's working
    fine. but it's giving me scroll bar in each form. we used
    rectangle box in most of the form and as u know i can not reffer
    rectangle box in programming.so i am not able to resize that. Is
    there any way so that i can refer that object programatically and
    can resize it.
    null

    shilpesh (guest) wrote:
    : I have to do some code migration from 16 bit Apps (Forms on
    : Win3.1) to 32 bit apps(Forms on WinNT).For this migration i
    made
    : a form for generation all the form in one shot . it's working
    : fine. but it's giving me scroll bar in each form. we used
    : rectangle box in most of the form and as u know i can not
    reffer
    : rectangle box in programming.so i am not able to resize that.
    Is
    : there any way so that i can refer that object programatically
    and
    : can resize it.
    Shilpesh,
    Please appreciate that this discussion forum is for Reports 6i
    Beta ONLY, as is also mentioned on the first page on the forum.
    Hence we will not be able to address this question .
    Regards
    The Oracle Reports Team
    null

  • How to populate list box in module pool program

    How to populate list box in module pool program.
    Please give me reply as soon as posible
    regards,
    Venu.

    hi,
    go thrugh the folling code .
    TABLES sdyn_conn.
    DATA   ok_code TYPE sy-ucomm.
    Global data
    TYPES: BEGIN OF type_carrid,
             carrid type spfli-carrid,
             carrname type scarr-carrname,
           END OF type_carrid.
    DATA itab_carrid TYPE STANDARD TABLE OF type_carrid.
    *& Processing Blocks called by the Runtime Environment                 *
    Event Block START-OF-SELECTION
    START-OF-SELECTION.
      CALL SCREEN 100.
    Dialog Module PBO
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
    ENDMODULE.
    Dialog Modules PAI
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'SELECTED'.
          MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
      ENDCASE.
    ENDMODULE.
    Dialog Module POV
    MODULE create_dropdown_box INPUT.
      SELECT carrid carrname
                    FROM scarr
                    INTO CORRESPONDING FIELDS OF TABLE itab_carrid.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'CARRID'
                value_org       = 'S'
           TABLES
                value_tab       = itab_carrid
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc <> 0.
      ENDIF.
    ENDMODULE.
    the following code should be included in flow logic of screen
    process on value-request.
      field scarr-carrname  module create_dropdown_box.
    in module pool select list box.
    hope it is useful.
    regards,
    sreelakshmi.

  • A rectangle box with four options, Restart,Sleep,Cancel and Shut Down appears some times when I boot up, how can I stop this from happening?

    A rectangle box come up sometimes when I boot up my computer, it says, Are you sure you want to shut down your computer now? and has four boxes Restart, Sleep,Cancel and Shut Down. How can I get rid of this annoying occurance?

    That box is normally invoked with Control-Eject.

  • How to create the selectable-resizable-movable transparent rectangle box?

    Hai,
    I want to create selectable-resizable-movable Transparent Rectangle box.This rectangular box may be moved and/or resized by putting the mouse pointer on a side or corner of the rectangle box.
    This is for cropping the image where rhe rectangle is selected. Please help how to write the code.
    Thanks in advance
    Regards,
    Saravanan.K

    Unless you're doing something special here (I'm not too sure what you mean by 'may not cover the background image'), I don't think you need an 'effect'.
    Try this:
    private Rectangle createSelectWindow(final Color color, double length) {
            Rectangle rect = new Rectangle(length, length);
            rect.setFill(Color.RED);
            rect.setStroke(Color.RED);
            rect.setOpacity(0.5);  // i.e. make it 50% visible
            rect.setCursor(Cursor.HAND);
            return rect;
    }Or, if you don't want the border to be translucent and just the fill, try this:
    private Rectangle createSelectWindow(final Color color, double length) {
            Rectangle rect = new Rectangle(length, length);
            rect.setFill(new Color(1, 0, 0, 0.5));  // rgba - use an alpha of 0.5 on the fill color
            rect.setStroke(Color.RED);
            rect.setCursor(Cursor.HAND);
            rootPane.getChildren().add(rect);
    }

  • How to apply List box for multiple selection of rows  in ALV report ?

    Hi Exprots,
    1: How to apply List box for multiple selection of rows  in ALV report ?
    Thanking you.
    Subash

    hi,
    check the below program.
    REPORT zalv_dropdowns.
    *Type pools declarations for ALV
    TYPE-POOLS : slis.
    *data declarations for ALV container,ALV grid, Fieldcatalogues & layout
    DATA: g_grid  TYPE REF TO cl_gui_alv_grid,
          g_custom_container TYPE REF TO cl_gui_custom_container,
          gt_fieldcat TYPE lvc_t_fcat,
          gs_layout TYPE lvc_s_layo.*INTERNAL TABLE AND WA DECLARATIONS FOR t517 A table
    DATA: gt_outtab TYPE STANDARD TABLE OF t517a INITIAL SIZE 0,
          wa_outtab TYPE t517a.
    START-OF-SELECTION.*Call to ALV
      CALL SCREEN 600.*On this statement double click  it takes you to the screen painter SE51.
    *Create a Custom container and name it CCONT and OK code as OK_CODE.
    *Save check and Activate the screen painter.
    *Now a normal screen with number 600 is created which holds the ALV grid.
    PBO of the actual screen , Here we can give a title and customized menus
    Here we also call the subroutine for ALV output.
          MODULE PBO OUTPUT                                             *
    MODULE pbo OUTPUT.
      PERFORM alv_output.
    ENDMODULE.                    "pbo OUTPUT
          MODULE PAI INPUT                                              *
    MODULE pai INPUT.
    ENDMODULE.                    "pai INPUT
    *&      Form  BUILD_FIELDCAT
    FORM build_fieldcat.
    DATA ls_fcat TYPE lvc_s_fcat.
    *Build the field catalogue
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = 'T517A'
        CHANGING
          ct_fieldcat      = gt_fieldcat.
    To assign dropdown in the fieldcataogue
      LOOP AT gt_fieldcat INTO ls_fcat.   
    CASE ls_fcat-fieldname.
       WHEN 'SLART'.
    *is the first list box
            ls_fcat-drdn_hndl = '1'.
            ls_fcat-outputlen = 15.
            MODIFY gt_fieldcat FROM ls_fcat.
    is the second list box    
    WHEN 'ABART'.       
            ls_fcat-drdn_hndl = '2'.
            ls_fcat-outputlen = 15.
            MODIFY gt_fieldcat FROM ls_fcat.   
    ENDCASE.
      ENDLOOP.
    ENDFORM.                    "build_fieldcat
    *&      Form  ALV_OUTPUT
    FORM alv_output .*Create object for container
      CREATE OBJECT g_custom_container
             EXPORTING container_name = 'CCONT'.
    *create object for grid
      CREATE OBJECT g_grid
             EXPORTING i_parent = g_custom_container.
    Build fieldcat and set column
    *Assign a handle for the dropdown listbox.
      PERFORM build_fieldcat.
    *Build layout
      PERFORM build_layout.
    Define a drop down table.
      PERFORM dropdown_table.
    *fetch values from the T517A table
      SELECT * FROM t517a INTO TABLE gt_outtab.
    *Display ALV output
      CALL METHOD g_grid->set_table_for_first_display
        EXPORTING
          is_layout       = gs_layout
        CHANGING
          it_fieldcatalog = gt_fieldcat
          it_outtab       = gt_outtab.ENDFORM.                               "ALV_OUTPUT
    *&      Form  dropdown_table
          text
    -->  p1        text
    <--  p2        text
    FORM dropdown_table.*Declarations for drop down lists in ALV.
      DATA: lt_dropdown TYPE lvc_t_drop,
            ls_dropdown TYPE lvc_s_drop.
    First SLART listbox (handle '1').
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '01 Primary school'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '1'.
      ls_dropdown-value = '02 Lower Secondary'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '1'.
      ls_dropdown-value = '03 Upper Secondary'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '04 Professional School'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '05 College'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '06 University'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '09 Other Establishment'.
      APPEND ls_dropdown TO lt_dropdown.* Second ABART listbox (handle '2').  ls_dropdown-handle = '2'.
      ls_dropdown-value = '10 Primary School certificate'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '20 Lower secondary/Junior high'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '30 High school diploma(B-levels)'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '31 Vocational'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '32 Matriculation'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '40 Specialist vocational certificate'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '50 College degree Level1'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '51 College degree Level2'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '52 Masters degree'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '60 Univ Degree level1'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '61 Bachelors degree'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '62 Masters degree'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '63 Licenciate'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '64 Doctors Degree Ph.D'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '89 None'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '90 Unknown'.
      APPEND ls_dropdown TO lt_dropdown.*method to display the dropdown in ALV
      CALL METHOD g_grid->set_drop_down_table
        EXPORTING
          it_drop_down = lt_dropdown.ENDFORM.                               " dropdown_table
    *&      Form  build_layout
          text
    *layout for ALV output
    FORM build_layout .  gs_layout-cwidth_opt = 'X'.
      gs_layout-grid_title = 'ALV DROPDOWN LISTS'.
      gs_layout-no_toolbar = 'X'.ENDFORM.                    " build_layout
    endform.
    Edited by: S.r.v.r.Kumar on Jun 1, 2009 2:48 PM

  • How can a dialog box close itself?

    I have a dialog box which displays a little form for some extra information.  I have some non-standard buttons which are under my control.  The form is created as a view in a window which is launched by CREATE_WINDOW.
    I want the window to be able to close itself.  The concept is easy - get a ref to the window, then call close( ).
    But I cannot find a way to get a reference to the window from inside the window.
    Here is my current solution which I do not like, but it works.
    I create a context node 'POPUP' which has an attribute ME of type ref to if_wd_window.
    When I create the window, I do this:
    lo_window         = lo_window_manager->create_window( ... )
    lr_node = wd_context->get_child_node(   'POPUP'   ).
    lr_node->set_attribute( exporting name  = 'ME'
                                          value = lo_window ).
    lo_window->open( ).
    In the window, it gets ME out of the node, and does a lr_me->close( ).
    But there is a better way, right?  How does a dialog box close itself under program control?
    I should add that the dialog box is displaying a view from a used component, so POPUP is defined in the used component and mapped into the context of the using component. I don't think this changes the problem, though.

    Hi
    Try this following code in method of button you have created for popup i.e  method for example  ok,cancel etc in the view which you have emebedded in ur window for popup.
    Close the popup
      DATA:
        lo_api         TYPE REF TO if_wd_view_controller,
        lo_window_ctlr TYPE REF TO if_wd_window_controller,
        lo_popup       TYPE REF TO if_wd_window.
      lo_api         = wd_this->wd_get_api( ).
      lo_window_ctlr = lo_api->get_embedding_window_ctlr( ).
      lo_popup       = lo_window_ctlr->get_window( ).
      IF lo_popup IS BOUND.
        lo_popup->close( ).
      ENDIF.

  • Hi very urgent  How to improve the performence of the program

    Hi all please tell me how to improve the performence of this program......
    REPORT z03_gil010 NO STANDARD PAGE HEADING LINE-SIZE 130.
                                 INCLUDE                                 *
    INCLUDE: z00_bci010.                   " Gestion des anomalies.
                          Déclaration des données                        *
                       Tables de la bases de données                     *
    TABLES:
            ekpo,        " Poste document d'achat.
            lfa1,        " Base fournisseurs (généralités).
            marc,        " Données division de l'article.
            z03_bw_cmp1,
            eord,        "Répertoire des sources appro. Achats
            eina,        "Fiche infos-achats - données générales
            t024,        "Groupes d'acheteurs
            tvarv.                                              "FAE17345+
                       Déclaration des données internes                  *
    Déclaration de la table interne qui permet de recuperer les mois.
    DATA: BEGIN OF itb_months OCCURS 12.
            INCLUDE STRUCTURE t247.
    DATA: END OF itb_months.
    Table pour récupération d'infos sur les divisions
    DATA: BEGIN OF itb_t001w OCCURS 0,
            werks LIKE t001w-werks,
            fabkl LIKE t001w-fabkl," Clé du calendrier d'entreprise
          END OF itb_t001w.
    Déclaration de la table interne contenant les infos sur l'adresse du
    fournisseur.
    DATA: BEGIN OF itb_adresse OCCURS 0,
            lifnr LIKE lfa1-lifnr,           " Numéro de compte fournisseur.
            name1 LIKE lfa1-name1,                              " Nom 1.
            name2 LIKE lfa1-name2,                              " Nom 2.
            name3 LIKE lfa1-name3,                              " Nom 3.
            name4 LIKE lfa1-name4,                              " Nom 4.
            stras LIKE lfa1-stras,           " N° de rue et nom de la rue.
            pstlz LIKE lfa1-pstlz,           " Code postal.
            ort01 LIKE lfa1-ort01,           " Localité.
            pfach LIKE lfa1-pfach,           " Boîte postale.
            pstl2 LIKE lfa1-pstl2,           " Code de la boîte postale.
            land1 LIKE lfa1-land1,           " Clé de pays.
            landx LIKE t005t-landx,          " Pays.
            spras LIKE lfa1-spras,           " Code langue
    END OF itb_adresse.
    Déclaration d'une table interne pour les informations sur les
    prévisions de commande.
    DATA: BEGIN OF itb_prev_cde OCCURS 0,
            werks LIKE marc-werks,            " Division
            idnlf LIKE eina-idnlf,            " ADDsde ref article frn
            lifnr LIKE eord-lifnr,            " N° fournisseur.
            ekgrp LIKE marc-ekgrp,            " Groupe d'acheteurs
            dispo LIKE marc-dispo,            " Code gestionnaire MRP
            matnr LIKE eord-matnr,            " Article.
            maktx LIKE makt-maktx,            " Désignation article.
            bstmi LIKE marc-bstmi,            " Quantité de commande.
            men00 LIKE plaf-gsmng,            " Quantité du mois en cours M.
            men01 LIKE plaf-gsmng,            " Quantité pour le mois M+1.
            men02 LIKE plaf-gsmng,            " Quantité pour le mois M+2.
            men03 LIKE plaf-gsmng,            " Quantité pour le mois M+3.
            men04 LIKE plaf-gsmng,            " Quantité pour le mois M+4.
            men05 LIKE plaf-gsmng,            " Quantité pour le mois M+5.
            men06 LIKE plaf-gsmng.            " Quantité pour le mois M+6.
    DATA: END OF itb_prev_cde.
    Structure de travail pour les commandes convernant les PFC
    DATA str_pca_pfc  LIKE itb_prev_cde.
    *add sde
    DATA str_eord_pfc  LIKE itb_prev_cde.
    Structure de travail pour les prévisons PFC
    DATA str_prev_pfc LIKE itb_prev_cde.
    Déclaration d'une table interne pour les informations sur le
    portefeuille des commandes d'achat.
    DATA: BEGIN OF itb_pca OCCURS 0,
            werks LIKE ekpo-werks,    " Division
            idnlf LIKE eina-idnlf,     " ADDsde ref article frn
            lifnr LIKE eord-lifnr,    " N° fournisseur.
            ekgrp LIKE marc-ekgrp,    " Groupe d'acheteurs
            dispo LIKE marc-dispo,    " Code gestionnaire MRP
            matnr LIKE eord-matnr,    " Article.
            maktx LIKE makt-maktx,    " Désignation article.
            ebeln LIKE ekes-ebeln,    " Numéro du document d'achat.
            ebelp LIKE ekes-ebelp,    " Numéro de poste du document d'achat.
            slfdt LIKE eket-slfdt,    " Date de livraison statistique
            eindt LIKE ekes-eindt,    " Date de livraison indiquée dans la
                                      " confirmation de la cde.
            menge LIKE ekes-menge,    " Quantité indiquée dans la confirma-
                                      " tion de la commande.
            attdu LIKE eket-wemng,    " Portefeuille fournisseur.
            netpr LIKE ekpo-brtwr,    " Prix net du document d'achat dans
                                      " la devise du document.
            rtard TYPE i,             " Retard en jours ouvres.
            wemng LIKE eket-wemng,    " Quantité de l'entrée de marchandise.
            bldat LIKE mkpf-bldat,    " Date inscrite sur la pièce/sur le
                                      " document.
            qtran LIKE ekes-menge,    " Quantité en transit.
            dtran LIKE ekes-eindt.    " Date du dernier avis de transit.
    DATA: END OF itb_pca.
    DATA: w_i TYPE i,                "Compteur
          w_i_char(1) TYPE c,        "Texte pour récupérer compteur
          w_nm_zone(20) TYPE c,      "Nom zone pour assign au field-symbols
          w_nb_j TYPE i,             "Nb de jours ouvrés jusqu'à fin mois
          w_nb_j_tot TYPE i.         "Nb de jours ouvrés du mois
    FIELD-SYMBOLS:       TYPE ANY.
    Déclaration d'une table contenant les fiches info achat.
    DATA: BEGIN OF itb_eina OCCURS 0,
            matnr LIKE eina-matnr,
            lifnr LIKE eina-lifnr,
            idfnl LIKE eina-idnlf.
    DATA: END OF itb_eina.
    Déclaration d'une table contenant les infos groupe acheteur.
    *DATA: BEGIN OF itb_t024 OCCURS 0,
           ekgrp LIKE t024-ekgrp,
           eknam LIKE t024-eknam,
           ektel LIKE t024-ektel,
           telfx LIKE t024-telfx.
    *DATA: END OF itb_t024.
    Déclaration d'une table pour le transfert du fichier.
    DATA: BEGIN OF itb_transfert OCCURS 0,
            col00(8),                 "division
            col00bis(20),             "Reference article
            col01(18),                "No article
            col02(45),                "libelle article
            col021(17),               "Groupe acheteur
            col022(13),               "gestionnaire
            col03(17),                "qte commandée ou No de commande
            col04(13),                "Mois 1 ou No poste cde
            col05(20),                "Mois 2 ou délai initial
            col06(33),                "Mois 3 ou délai négocié
            col07(13),                "Mois 4 ou qté cdée
            col08(13),                "Mois 5 ou qté attendue
            col09(13),                "Mois 6 ou Montant attendu
            col10(13),                "Mois 7 ou retard
            col11(13),                "qte partielle livree
            col12(13),                "date livraison partielle
            col13(13),                "qté en transit
            col14(13).                "date
    DATA: END OF itb_transfert.
    Déclaration d'une table contenant la liste des fournisseurs.
    DATA: BEGIN OF itb_lifnr OCCURS 0,
            werks LIKE marc-werks,
            idfnl LIKE eina-idnlf,
            lifnr LIKE eord-lifnr,
            ekgrp LIKE marc-ekgrp,
            spras LIKE lfa1-spras,
            eknam LIKE t024-eknam,
            ektel LIKE t024-ektel,
            telfx LIKE t024-telfx.
    DATA: END OF itb_lifnr.
    Déclaration d'une structure pour la selection dans la table MSEG.
    DATA : BEGIN OF itb_mseg OCCURS 0,
             mblnr LIKE mseg-mblnr,
             mjahr LIKE mseg-mjahr,
             ebeln LIKE mseg-ebeln,
             ebelp LIKE mseg-ebelp,
           END OF itb_mseg.
    déclaration d'une structure pour la selection dans EKPO.
    DATA : BEGIN OF itb_ekpo OCCURS 0,
             lifnr LIKE ekko-lifnr,
             ebeln LIKE ekpo-ebeln,
             ebelp LIKE ekpo-ebelp,
             menge LIKE ekpo-menge,
             bpumz LIKE ekpo-bpumz,
             bpumn LIKE ekpo-bpumn,
             matnr LIKE ekpo-matnr,
             werks LIKE ekpo-werks,
             netpr LIKE ekpo-netpr,
             peinh LIKE ekpo-peinh,  "Base de prix FAE17345+
             ekgrp LIKE ekko-ekgrp,   "AFT++
             dispo LIKE marc-dispo,   "AFT++
           END OF itb_ekpo.
    déclaration d'une structure pour la selection dans EKPO.
    DATA : BEGIN OF itb_ekko OCCURS 0,
             ebeln LIKE ekko-ebeln,
             lifnr LIKE ekko-lifnr,
             spras LIKE ekko-spras,
           END OF itb_ekko.
    déclaration d'une structure pour la selection dans EKES.
    DATA : BEGIN OF itb_ekes OCCURS 0,
             ebeln LIKE eket-ebeln,
             ebelp LIKE eket-ebelp,
             ebtyp LIKE ekes-ebtyp,
             eindt LIKE ekes-eindt,
             menge LIKE ekes-menge,
             dabmg LIKE ekes-dabmg,
             etens LIKE ekes-etens,
           END OF itb_ekes.
    déclaration d'une structure pour la selection dans EKET
    DATA : BEGIN OF itb_eket OCCURS 0,
             ebeln LIKE eket-ebeln,
             ebelp LIKE eket-ebelp,
             menge LIKE eket-menge,
             wemng LIKE eket-wemng,
             eindt LIKE eket-eindt,
             slfdt LIKE eket-slfdt,
           END OF itb_eket.
    déclaration d'une structure pour la selection dans MKPF.
    DATA : BEGIN OF itb_mkpf OCCURS 0,
             mblnr LIKE mkpf-mblnr,
             mjahr LIKE mkpf-mjahr,
             bldat LIKE mkpf-bldat,
           END OF itb_mkpf.
    Déclaration d'une structure pour la sélection dans EORD.
    DATA : BEGIN OF itb_eord OCCURS 0,
             matnr LIKE eord-matnr,
             werks LIKE eord-werks,
             lifnr LIKE eord-lifnr,
             ekgrp LIKE marc-ekgrp,
             dispo LIKE marc-dispo,                             "DE3K924352
             disls LIKE marc-disls,
             bstfe LIKE marc-bstfe,
             bstrf LIKE marc-bstrf,
             bstmi LIKE marc-bstmi,
             bstma LIKE marc-bstma,
           END OF itb_eord.
    DATA : BEGIN OF itb_eordw OCCURS 0.
            INCLUDE STRUCTURE itb_eord.
    DATA : END OF itb_eordw.
    Déclaration d'une structure pour la sélection dans MAKT.
    DATA : BEGIN OF itb_makt OCCURS 0,
             matnr LIKE makt-matnr,
             spras LIKE makt-spras,
             maktx LIKE makt-maktx,
           END OF itb_makt.
    Déclaration d'une structure pour la sélection dans EBAN.
    DATA : BEGIN OF itb_eban OCCURS 0,
             matnr LIKE eban-matnr,
             werks LIKE eban-werks,
             flief LIKE eban-flief,
             lfdat LIKE eban-lfdat,
             menge LIKE eban-menge,
             bsmng LIKE eban-bsmng,
             webaz LIKE eban-webaz,
             ekgrp LIKE eban-ekgrp,
             ebeln LIKE eban-ebeln,
             banfn LIKE eban-banfn,
             bnfpo LIKE eban-bnfpo, "DB3K900702+
           END OF itb_eban.
    Déclaration d'une structure pour la sélection dans PLAF.
    DATA : BEGIN OF itb_plaf OCCURS 0,
             plnum LIKE plaf-plnum, "DB3K900702+
             matnr LIKE plaf-matnr,
             plwrk LIKE plaf-plwrk,
             flief LIKE plaf-flief,
             pedtr LIKE plaf-pedtr,
             gsmng LIKE plaf-gsmng,
             webaz LIKE plaf-webaz,
           END OF itb_plaf.
    Déclaration d'une structure pour la sélection dans MARC.
    DATA : BEGIN OF itb_marc OCCURS 0,
             matnr LIKE marc-matnr,
             werks LIKE marc-werks,
             disls LIKE marc-disls,
             bstrf LIKE marc-bstrf,
             bstmi LIKE marc-bstmi,
             bstma LIKE marc-bstma,
             bstfe LIKE marc-bstfe,
             ekgrp LIKE marc-ekgrp,
             dispo LIKE marc-dispo,
           END OF itb_marc.
    DATA : BEGIN OF itb_marc_eord OCCURS 0,
              matnr LIKE marc-matnr,
              werks LIKE marc-werks,
              strgr LIKE marc-strgr,   "groupe de stratégie planif
           END OF itb_marc_eord.
    DATA : BEGIN OF itb_z03_bw_cmp1 OCCURS 0,
             matnr LIKE z03_bw_cmp1-matnr,
             werks LIKE z03_bw_cmp1-werks,
             pdatu LIKE z03_bw_cmp1-pdatu,
             plnmg LIKE z03_bw_cmp1-plnmg,
           END OF itb_z03_bw_cmp1.
    Begin change BNI <DE3K937051>
    DATA : BEGIN OF itb_z03_bw_cmp2 OCCURS 0,
             matnr LIKE z03_bw_cmp2-matnr,
             werks LIKE z03_bw_cmp2-werks,
             pdatu LIKE z03_bw_cmp2-pdatu,
             plnmg LIKE z03_bw_cmp2-plnmg,
           END OF itb_z03_bw_cmp2.
    *End change BNI
    DATA : BEGIN OF str_index1,
             matnr LIKE eord-matnr,
             werks LIKE eord-werks,
          END OF str_index1.
    DATA : BEGIN OF str_index2,
             matnr LIKE eord-matnr,
             werks LIKE eord-werks,
          END OF str_index2.
    DATA : BEGIN OF str_index3_eord,
             matnr LIKE eord-matnr,
             werks LIKE eord-werks,
          END OF str_index3_eord.
    DATA : BEGIN OF str_index4,
             matnr LIKE eord-matnr,
             werks LIKE eord-werks,
          END OF str_index4.
    DATA : BEGIN OF str_index5,
             matnr LIKE eord-matnr,
             werks LIKE eord-werks,
    END OF str_index5.
    DATA : BEGIN OF str_index6,
             matnr LIKE eord-matnr,
             werks LIKE eord-werks,
    END OF str_index6.
    DATA : BEGIN OF str_index7,
             matnr LIKE eord-matnr,
             werks LIKE eord-werks,
    END OF str_index7.
    Déclaration des variables de debut et de fin de mois.
    DATA: w_debut_mois    LIKE sy-datum,
          w_debut_periode LIKE sy-datum,
          w_fin_mois      LIKE sy-datum,
          w_fin_periode   LIKE sy-datum.
    Déclaration des variables pour les dates.
    DATA: w_date0 LIKE sy-datum,
          w_date1 LIKE sy-datum,
          w_date2 LIKE sy-datum,
          w_date3 LIKE sy-datum,
          w_date4 LIKE sy-datum,
          w_date5 LIKE sy-datum,
          w_date6 LIKE sy-datum,
          w_datejour LIKE sy-datum,                             "FAE15269
          w_dat_da LIKE eban-lfdat,
          w_dat_op LIKE plaf-pedtr,
          w_mois0 LIKE t247-ltx,
          w_mois1 LIKE t247-ltx,
          w_mois2 LIKE t247-ltx,
          w_mois3 LIKE t247-ltx,
          w_mois4 LIKE t247-ltx,
          w_mois5 LIKE t247-ltx,
          w_mois6 LIKE t247-ltx,
          w_lendemain LIKE sy-datum.                            "FAE17345+
    Temoin d'un AR dans la commande d'achat.
    DATA: w_temoin_ar.
    Numéro de la confirmation de la commande
    DATA : w_etens LIKE ekes-etens.
    Déclaration des variables pour le nom des fichiers.
    DATA: w_nom_fichier LIKE rlgrap-filename,
          w_fichier LIKE rlgrap-filename,
          w_racine LIKE rlgrap-filename,
          w_file LIKE rlgrap-filename.
    Déclaration d'une table interne pour le transfert.
    DATA: BEGIN OF itb_trans OCCURS 0,
            w_ligne(320).
    DATA: END OF itb_trans.
    Déclaration d'une variable pour rechercher les enregistrements vides.
    DATA: w_compteur     TYPE i,
          w_compteur1    TYPE i,
          w_compteur2    TYPE i,
          w_retard       TYPE i,          " Retard en jours ouvres.
          w_trouve_pfc   TYPE c, "addsde
          w_trouve_pfs   TYPE c, "+DE3K937051
          w_trouve       TYPE c.
    *Index pour les LOOP
    DATA : w_index_ekpo LIKE sy-tabix,
           w_index_ekes LIKE sy-tabix,
           w_index_eket LIKE sy-tabix,
           w_index_mseg LIKE sy-tabix,
           w_index_eban LIKE sy-tabix,
           w_index_plaf LIKE sy-tabix,
           w_index_pca  LIKE sy-tabix,
           w_index_z03_bw_cmp1 LIKE sy-tabix,
           w_index_z03_bw_cmp2 LIKE sy-tabix."+DE3K937051
    RANGES : r_type_pfs   FOR marc-strgr.
    *fichier sur serveur +EDR231003
    DATA : w_chemin LIKE filename-fileintern,  "nom du fichier
           w_date_fichier(12) TYPE c,          "Date format DD_MM_AA
           w_csv(307) TYPE c.                  "ligne du fichier format CSV
    CONSTANTS: k_imputation_m LIKE eban-knttp VALUE 'M'.        "FAE19001+
                     Description de l écran de sélection                 *
                         Paramètres "UTILISATION"                        *
    Ouverture d'un block de sélection pour le(s) fournisseur(s).
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-bl1.
    Sélection division(s)
    SELECT-OPTIONS: s_werks FOR ekpo-werks.
    Sélection fournisseur(s).
    SELECT-OPTIONS: s_lifnr FOR lfa1-lifnr OBLIGATORY.
    Sélection du Groupe d'acheteur
    *SELECT-OPTIONS: s_ekgrp FOR marc-ekgrp.   "-FAE26446
    *SELECT-OPTIONS: s_dispo FOR marc-dispo.   "-FAE26446
    SELECTION-SCREEN END OF BLOCK block1.
    FAE 26446 : ajout
    SELECTION-SCREEN BEGIN OF BLOCK block3 WITH FRAME TITLE text-bl3.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETER p_ekgrp RADIOBUTTON GROUP g3.
    SELECTION-SCREEN COMMENT 5(24) text-001 FOR FIELD p_ekgrp.
    SELECT-OPTIONS: s_ekgrp FOR marc-ekgrp.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETER p_dispo RADIOBUTTON GROUP g3.
    SELECTION-SCREEN COMMENT 5(24) text-002 FOR FIELD p_dispo.
    SELECT-OPTIONS: s_dispo FOR marc-dispo.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK block3.
    FAE 26446 : fin ajout
                           Paramètres "SYSTEME"                          *
    Saut de 2 lignes.
    SELECTION-SCREEN: SKIP 2.
    Ouverture d'un block de sélection pour l'adresse physique du fichier.
    SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-bl2.
    PARAMETERS: p_pc       RADIOBUTTON GROUP rad1 DEFAULT 'X',  "+EDR231003
                p_fic_pc LIKE rlgrap-filename.                  "+EDR231003
    SELECTION-SCREEN SKIP.                                      "+EDR231003
    PARAMETERS     : p_serve   RADIOBUTTON GROUP rad1,          "+EDR231003
                     p_fic_se LIKE filename-fileintern          "+EDR231003
                              DEFAULT 'Z03_PREV_COMMANDES'.     "+EDR231003
    SELECTION-SCREEN END OF BLOCK block2.
                           Logique de traitement                         *
                              INITIALIZATION                             *
    INITIALIZATION.
    Date du jour
      MOVE sy-datum TO w_datejour.                              "FAE15269
    Gestion des anomalies.
      MOVE text-lb1 TO w_lb_traitement.
      PERFORM f930_init USING sy-cprog '30'.
    Fin de la gestions des anomalies.
    Récuperation des mois dans la table interne 'ITB_MONTHS'.
      CALL FUNCTION 'MONTH_NAMES_GET'
           EXPORTING
                language              = sy-langu
           TABLES
                month_names           = itb_months
           EXCEPTIONS
                month_names_not_found = 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.
    Récupération des differentes periodes.
      PERFORM f100_recuperation_date TABLES itb_months.
    Récupération du debut du mois.
      CONCATENATE sy-datlo(6) '01' INTO w_debut_mois.
      MOVE: w_debut_mois TO w_debut_periode.
    Récupération du dernier jour du mois.
      CALL FUNCTION 'LAST_DAY_OF_MONTHS'
           EXPORTING
                day_in            = sy-datlo
           IMPORTING
                last_day_of_month = w_fin_mois
           EXCEPTIONS
                day_in_no_date    = 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.
                              TOP-OF-PAGE                                *
    TOP-OF-PAGE.
      CALL FUNCTION 'Z_00_BC_TOP_OF_PAGE'
           EXPORTING
                p_linsz   = k_ligne
                p_pagno   = sy-pagno
                p_prog    = sy-cprog
                p_projet  = k_projet
                p_societe = k_societe
                p_sujet   = sy-title.
                              END-OF-PAGE                                *
    END-OF-PAGE.
                            AT SELECTION-SCREEN                          *
    FAE 26446 : ajout
    AT SELECTION-SCREEN ON BLOCK block3.
      IF NOT ( s_ekgrp IS INITIAL )
      AND  NOT ( s_dispo IS INITIAL ).
        MESSAGE e394(z03_mm).
      ENDIF.
      IF p_ekgrp = 'X'.
        IF s_ekgrp IS INITIAL.
          MESSAGE e395(z03_mm).
        ENDIF.
      ELSE.
        IF s_dispo IS INITIAL.
          MESSAGE e396(z03_mm).
        ENDIF.
      ENDIF.
    fae26446 fin ajout
    AT SELECTION-SCREEN ON BLOCK block2.
      IF p_pc = 'X'.
        IF p_fic_pc IS INITIAL.
    *Attention, il n'y a aucune adresse de sauvegarde pour le(s) fichier(s)
          MESSAGE e021(z03_mm).
        ENDIF.
      ELSE.
        IF p_fic_se IS INITIAL.
    *Attention, il n'y a aucune adresse de sauvegarde pour le(s) fichier(s)
          MESSAGE e021(z03_mm).
        ENDIF.
      ENDIF.
    Création du matchcode pour la selection du fichier local.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fic_pc.
      CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
                def_filename     = p_fic_pc
                def_path         = 'C:'
                mask             = text-ma1
                mode             = 'S'
                title            = text-sel
           IMPORTING
                filename         = p_fic_pc
           EXCEPTIONS
                inv_winsys       = 1
                no_batch         = 2
                selection_cancel = 3
                selection_error  = 4
                OTHERS           = 5.
      IF sy-subrc NE 0 AND sy-subrc NE 3.
        MESSAGE e032(z03_mm).
      ENDIF.
                            START-OF-SELECTION                           *
    START-OF-SELECTION.
      PERFORM select_donnees.
    =================================================
    Liste des ARTICLES impactés pour les prévisions *
    =================================================
    ===================================
    PORTEFEUILLE DE COMMANDES D'ACHAT *
    ===================================
    Construction itb_pca à partir de EKKO/EKPO.
      w_index_ekpo  = 1.
      w_index_ekes  = 1.
      w_index_eket  = 1.
      w_index_mseg  = 1.
    SORT itb_ekko BY ebeln.           "-FAE26446
      SORT itb_ekpo BY ebeln ebelp.
      SORT itb_makt BY matnr spras.
      SORT itb_eket BY ebeln ebelp.
      SORT itb_ekes BY ebeln ebelp.
      SORT itb_mseg BY ebeln ebelp.
      SORT itb_mkpf BY mblnr mjahr.
      SORT itb_marc BY matnr werks.                             "+FAE26446
    FAE 26446 remplacement
    LOOP AT itb_ekko.
       LOOP AT itb_ekpo.
               FROM w_index_ekpo.
         IF itb_ekko-ebeln = itb_ekpo-ebeln.
      LOOP AT itb_ekpo.
        READ TABLE itb_marc WITH KEY
           matnr = itb_ekpo-matnr
           werks = itb_ekpo-werks BINARY SEARCH.
        CHECK sy-subrc = 0.
    FAE 26446 fin remplacement
        itb_pca-ebeln = itb_ekpo-ebeln.
        itb_pca-ebelp = itb_ekpo-ebelp.
      itb_pca-lifnr = itb_ekko-lifnr.   "-FAE26446
        itb_pca-lifnr = itb_ekpo-lifnr.                         "+FAE26446
        itb_pca-ekgrp = itb_ekpo-ekgrp.                         "+FAE26446
        itb_pca-dispo = itb_ekpo-dispo.                         "+FAE26446
        itb_pca-matnr = itb_ekpo-matnr.
        itb_pca-werks = itb_ekpo-werks.
      Recherche du libellé article
        READ TABLE itb_makt
                   WITH KEY matnr = itb_ekpo-matnr
                            spras = text-fra
                   BINARY SEARCH.
        IF sy-subrc = 0.
          itb_pca-maktx = itb_makt-maktx.
        ELSE.
          READ TABLE itb_makt
                    WITH KEY matnr = itb_ekpo-matnr
                             spras = text-ang
                    BINARY SEARCH.
          IF sy-subrc = 0.
            itb_pca-maktx = itb_makt-maktx.
          ENDIF.
        ENDIF.
        IF NOT itb_ekpo-bpumn IS INITIAL.
          itb_pca-menge = itb_ekpo-menge * itb_ekpo-bpumz /
                                           itb_ekpo-bpumn.
        ENDIF.
      Sélect° ds la table EKES des dates de livraisons et des qtés
      en transit
        CLEAR w_temoin_ar.
        CLEAR w_etens.
        LOOP AT itb_ekes
                FROM w_index_ekes.
          IF  itb_ekes-ebeln = itb_ekpo-ebeln
          AND itb_ekes-ebelp = itb_ekpo-ebelp.
            IF itb_ekes-ebtyp = text-arn.
              itb_pca-eindt = itb_ekes-eindt.
              w_temoin_ar = 'X'.
            ELSE.
            Si c'est une qté en transit alors on recupere
            la quantité et la date.
              IF itb_ekes-dabmg < itb_ekes-menge.
                itb_pca-qtran = itb_pca-qtran + itb_ekes-menge -
                                itb_ekes-dabmg.
              ENDIF.
              IF itb_ekes-etens > w_etens.
                w_etens = itb_ekes-etens.
                itb_pca-dtran = itb_ekes-eindt.
              ENDIF.
            ENDIF.
          ELSEIF itb_ekes-ebeln > itb_ekpo-ebeln
          OR ( itb_ekes-ebeln = itb_ekpo-ebeln
          AND itb_ekes-ebelp > itb_ekpo-ebelp ).
            w_index_ekes = sy-tabix.
            EXIT.
          ENDIF.
        ENDLOOP.
      S'il n'y a pas d'AR alors récupérat° de la date livraison dans EKET.
        LOOP AT itb_eket
                FROM w_index_eket.
          IF  itb_eket-ebeln = itb_ekpo-ebeln
          AND itb_eket-ebelp = itb_ekpo-ebelp.
            IF w_temoin_ar IS INITIAL.
              itb_pca-eindt = itb_eket-eindt.
            ENDIF.
            itb_pca-slfdt = itb_eket-slfdt.
          Calcul du portefeuille fournisseur à partir de la
          qté commandée et la qté reçue
            itb_pca-attdu = itb_pca-attdu + itb_eket-menge -
                            itb_eket-wemng.
          Calcul du montant du poste
            itb_pca-netpr = itb_ekpo-netpr * itb_pca-attdu.
            IF itb_ekpo-peinh NE 0.
              itb_pca-netpr = itb_pca-netpr / itb_ekpo-peinh.
            ENDIF.
          Calcul quantité réceptionnée.
            itb_pca-wemng = itb_pca-wemng + itb_eket-wemng.
          Calcul du retard en nombre de jours calendaires
          Le calcul du retard  ne doit pas prendre en compte
          le jour de livraison
            ADD 1 TO itb_eket-eindt.
            IF NOT itb_pca-attdu  IS INITIAL
            AND    itb_eket-eindt LT sy-datum.
            Calcul du retard en nombre de jours ouvrés
              CLEAR w_retard.
              CALL FUNCTION 'Z_00_BC_WORKDAYS_PER_PERIOD'
                   EXPORTING
                        date_deb = itb_eket-eindt
                        date_fin = sy-datum
                   IMPORTING
                        jours    = w_retard.
              itb_pca-rtard = itb_pca-rtard + w_retard .
            ENDIF.
          ELSEIF itb_eket-ebeln > itb_ekpo-ebeln
          OR (   itb_eket-ebeln = itb_ekpo-ebeln
          AND    itb_eket-ebelp > itb_ekpo-ebelp ).
            w_index_eket = sy-tabix.
            EXIT.
          ENDIF.
        ENDLOOP.
      Recherche de la derniere date de livraison.
        LOOP AT itb_mseg
                FROM w_index_mseg.
          IF  itb_mseg-ebeln = itb_ekpo-ebeln
          AND itb_mseg-ebelp = itb_ekpo-ebelp.
            READ TABLE itb_mkpf
                       WITH KEY mblnr = itb_mseg-mblnr
                                mjahr = itb_mseg-mjahr
                       BINARY SEARCH.
            IF sy-subrc = 0.
              IF itb_mkpf-bldat > itb_pca-bldat.
                itb_pca-bldat = itb_mkpf-bldat.
              ENDIF.
            ENDIF.
          ELSEIF itb_mseg-ebeln > itb_ekpo-ebeln
          OR (   itb_mseg-ebeln = itb_ekpo-ebeln
          AND    itb_mseg-ebelp > itb_ekpo-ebelp ).
            w_index_mseg = sy-tabix.
            EXIT.
          ENDIF.
        ENDLOOP.
        APPEND itb_pca.
        CLEAR itb_pca.
    FAE26446 suppression parag. suivant
         ELSEIF itb_ekpo-ebeln > itb_ekko-ebeln.
           w_index_ekpo = sy-tabix.
           EXIT.
         ENDIF.
       ENDLOOP.
    Fin FAE26446
      ENDLOOP.
    =========================
    PREVISIONS DE COMMANDES *
    =========================
      SORT itb_eord        BY matnr werks lifnr ekgrp.
      SORT itb_eban        BY matnr werks flief ekgrp.
      SORT itb_plaf        BY matnr plwrk flief.
      SORT itb_z03_bw_cmp1 BY matnr werks.
      SORT itb_z03_bw_cmp2 BY matnr werks."+DE3K937051
      SORT itb_pca         BY matnr werks lifnr.
      w_index_eban = 1.
      w_index_plaf = 1.
      w_index_z03_bw_cmp1 = 1.
      w_index_pca = 1.
      w_index_z03_bw_cmp2 = 1."+DE3K937051
    Remplissage de la table des prévisions de commande.
      LOOP AT itb_eord.
        CLEAR: str_prev_pfc,
               w_trouve.
        MOVE-CORRESPONDING itb_eord TO str_index1.
        MOVE-CORRESPONDING itb_eord TO str_index3_eord.
        MOVE-CORRESPONDING itb_eord TO itb_prev_cde.
      Recherche dans table division/article (MARC) afin de déterminer si
      article PFS (prod fabriqué à stock) ou PFC (Prod fabriqué sur cde)
        AT NEW werks.
          READ TABLE itb_marc_eord
                     WITH KEY matnr = itb_eord-matnr
                              werks = itb_eord-werks
                     BINARY SEARCH.
          IF sy-subrc NE 0.
            CLEAR itb_marc_eord.
          ENDIF.
        ENDAT.
    a - Prévisions pour les PFS : DA + OP *
    *Calcul des quantités de commande.
        IF itb_eord-disls = text-tl1.
          itb_prev_cde-bstmi =  itb_eord-bstfe.
        ELSEIF itb_eord-disls = text-tl2
        OR     itb_eord-disls = text-tl3.
          IF  itb_eord-bstrf NE 0
          AND itb_eord-bstmi = 0
          AND itb_eord-bstma = 0.
            itb_prev_cde-bstmi = itb_eord-bstrf.
          ELSEIF itb_eord-bstrf NE 0
          AND    itb_eord-bstmi NE 0.
            itb_prev_cde-bstmi = itb_eord-bstmi.
          ELSEIF itb_eord-bstrf = itb_eord-bstma
          AND    itb_eord-bstrf NE 0
          AND    itb_eord-bstmi = 0.
            itb_prev_cde-bstmi = itb_eord-bstma.
          ENDIF.
        ENDIF.
      si article PFS (Prod fabriqué à stock) recherche des
      demandes d'achat ou ordres planfiés
        IF itb_marc_eord-strgr IN r_type_pfs.
      Récupérat° calendrier de la division pour calcul correct lors de
      l'ajout de eban-webaz ou plaf-webaz jours ouvrés
          CLEAR w_trouve_pfs ."+DE3K937051
          READ TABLE itb_t001w
                     WITH KEY werks = itb_eord-werks
                     BINARY SEARCH.
          IF sy-subrc = 0.
            LOOP AT itb_eban
                    FROM w_index_eban.
              MOVE-CORRESPONDING itb_eban TO str_index2.
              IF str_index1 = str_index2.
                w_trouve_pfs = 'X'."+DE3K937051
              si qte commandées pour la DA  < quantité de la DA
                IF itb_eban-bsmng < itb_eban-menge.
                ajout de quantité de la DA - qte  commandée pour la DA
                  PERFORM affect_da.
                ENDIF.
              ELSEIF str_index2 > str_index1.
                w_index_eban = sy-tabix.
                EXIT.
              ENDIF.
            ENDLOOP.
          ENDIF.
        ajout des quantité des OP (ordres planifiés)
          LOOP AT itb_plaf
                  FROM w_index_plaf.
            MOVE-CORRESPONDING itb_plaf TO str_index4.
            str_index4-werks = itb_plaf-plwrk.
          str_index4-lifnr = itb_plaf-flief.
            IF str_index4 = str_index3_eord.
            Ajout de webaz jours ouvrés à pedtr
              CALL FUNCTION 'Z_03_MM_ADD_TO_FACTORYDATE'
                   EXPORTING
                        i_date        = itb_plaf-pedtr
                        i_calendar_id = itb_t001w-fabkl
                        i_nb_days     = itb_plaf-webaz
                   IMPORTING
                        o_date        = w_dat_op
                   EXCEPTIONS
                        conv_error    = 1
                        OTHERS        = 2.
              IF sy-subrc
       If forecasts found in Z03_BW_CMP2 for the article
       IF w_trouve_pfs = 'X'."-DE3K937602
    Recalculation prev month M in fct of Nb of wrought days of the month
        IF NOT itb_prev_cde-men00 IS INITIAL.
       one does not hold any more account of the day in progress
          w_lendemain = w_date0 + 1.
          CLEAR:w_nb_j,w_nb_j_tot.         "DE3K938206+
          CALL FUNCTION 'Z_00_BC_WORKDAYS_PER_PERIOD'
               EXPORTING
                    date_deb = w_lendemain
                    date_fin = w_fin_mois
               IMPORTING
                    jours    = w_nb_j.
          CALL FUNCTION 'Z_00_BC_WORKDAYS_PER_MONTH'
               EXPORTING
                    date  = w_lendemain
               IMPORTING
                    jours = w_nb_j_tot.
          itb_prev_cde-men00  = itb_prev_cde-men00 * w_nb_j / w_nb_j_tot
    *CLA DE3K925301 FAE27197
    *to round has the higher entirety
        itb_prev_cde-men00  = ceil( itb_prev_cde-men00 ). "DE3K938206-
        ENDIF.
       ENDIF."-DE3K937602
    *End change BNI
    b - Prévisions pour les PFC (Z03_BW_CMP1 puis rééquilibrage) *
      Recherche des previsions dans Z03_BW_CMP1
      si article PFC (Prod fabriqué sur cde) recherche des prévisions
        IF  NOT itb_marc_eord-strgr IN r_type_pfs.
          CLEAR str_prev_pfc.
          MOVE-CORRESPONDING itb_eord TO str_prev_pfc.
          CLEAR w_trouve_pfc .
          LOOP AT itb_z03_bw_cmp1
                  FROM w_index_z03_bw_cmp1.
            MOVE-CORRESPONDING itb_z03_bw_cmp1 TO str_index7.
            MOVE-CORRESPONDING itb_eord TO str_index6.
            IF str_index6 = str_index7.
          si on trouve des prévisions dans z03_bw_cmp1 pour la source
          d'appro eord alors c'est un article  PFC
              w_trouve_pfc = 'X'.
              CASE itb_z03_bw_cmp1-pdatu+0(6).
                WHEN w_date0+0(6).
                  str_prev_pfc-men00 = itb_z03_bw_cmp1-plnmg.
                WHEN w_date1+0(6).
                  str_prev_pfc-men01 = itb_z03_bw_cmp1-plnmg.
                WHEN w_date2+0(6).
                  str_prev_pfc-men02 = itb_z03_bw_cmp1-plnmg.
                WHEN w_date3+0(6).
                  str_prev_pfc-men03 = itb_z03_bw_cmp1-plnmg.
                WHEN w_date4+0(6).
                  str_prev_pfc-men04 = itb_z03_bw_cmp1-plnmg.
                WHEN w_date5+0(6).
                  str_prev_pfc-men05 = itb_z03_bw_cmp1-plnmg.
                WHEN w_date6+0(6).
                  str_prev_pfc-men06 = itb_z03_bw_cmp1-plnmg.
                WHEN OTHERS.
              ENDCASE.
            ELSEIF str_index7 > str_index6.
              w_index_z03_bw_cmp1 = sy-tabix.
              EXIT.
            ENDIF.
          ENDLOOP.
    *Begin change BNI
        Si des prévisions trouvées dans Z03_BW_CMP1 pour l'article
          IF w_trouve_pfc = 'X'.
          Recalcul prev mois M en fct du nb de jours ouvrés du mois
            IF NOT str_prev_pfc-men00 IS INITIAL.
            on ne tient plus compte du jour en cours
              w_lendemain = w_date0 + 1.
              CLEAR:w_nb_j,w_nb_j_tot.               "DE3K938206+
              CALL FUNCTION 'Z_00_BC_WORKDAYS_PER_PERIOD'
                   EXPORTING
                        date_deb = w_lendemain
                        date_fin = w_fin_mois
                   IMPORTING
                        jours    = w_nb_j.
              CALL FUNCTION 'Z_00_BC_WORKDAYS_PER_MONTH'
                   EXPORTING
                        date  = w_lendemain
                   IMPORTING
                        jours = w_nb_j_tot.
              str_prev_pfc-men00 = str_prev_pfc-men00 * w_nb_j / w_nb_j_tot.
    *CLA DE3K925301 FAE27197
    *arrondir a l'entier supèrieur
              str_prev_pfc-men00 = ceil( str_prev_pfc-men00 ).
            ENDIF.
          Equilibrage PFC : commande/prévision du mois
          Recherche COMMANDES cumulées pour M à M+6
            CLEAR str_pca_pfc.
            LOOP AT itb_pca
                    FROM w_index_pca.
              MOVE-CORRESPONDING itb_pca TO str_index5.
              IF str_index5 = str_index3_eord.
                IF NOT itb_pca-menge IS INITIAL.
                  CASE itb_pca-eindt+0(6).
                    WHEN w_date0+0(6).
                      IF itb_pca-eindt >= w_date0.
                      str_pca_pfc-men00 = str_pca_pfc-men00 + itb_pca-menge.
                      ENDIF.
                    WHEN w_date1+0(6).
                      str_pca_pfc-men01 = str_pca_pfc-men01 + itb_pca-menge.
                    WHEN w_date2+0(6).
                      str_pca_pfc-men02 = str_pca_pfc-men02 + itb_pca-menge.
                    WHEN w_date3+0(6).
                      str_pca_pfc-men03 = str_pca_pfc-men03 + itb_pca-menge.
                    WHEN w_date4+0(6).
                      str_pca_pfc-men04 = str_pca_pfc-men04 + itb_pca-menge.
                    WHEN w_date5+0(6).
                      str_pca_pfc-men05 = str_pca_pfc-men05 + itb_pca-menge.
                    WHEN w_date6+0(6).
                      str_pca_pfc-men06 = str_pca_pfc-men06 + itb_pca-menge.
                  ENDCASE.
                ENDIF."NOT itb_pca-menge IS INITIAL
              ELSEIF str_index5 > str_index3_eord.
                w_index_pca = sy-tabix.
                EXIT.
              ENDIF.
            ENDLOOP."itb_pca
    *. Equilibrer commande / prévision des mois : diminuer la quantité de
    prévision de chaque mois par le portefeuille de commande client du
    mois*. Si ce solde est négatif alors lui donner la valeur 0.
            w_i = 0.
          Ajustement commandes/prévisions pour les mois M à M+6
            WHILE w_i .
            Pour un mois, SI Prévisions > Commandes en cours
              IF .
              Prévisions = Prévisions - Commandes en cours
                 = 0.
              ENDIF.
            On passe au mois suivant
              w_i = w_i + 1.
            ENDWHILE.
            MOVE str_prev_pfc-men00 TO itb_prev_cde-men00.
            MOVE str_prev_pfc-men01 TO itb_prev_cde-men01.
            MOVE str_prev_pfc-men02 TO itb_prev_cde-men02.
            MOVE str_prev_pfc-men03 TO itb_prev_cde-men03.
            MOVE str_prev_pfc-men04 TO itb_prev_cde-men04.
            MOVE str_prev_pfc-men05 TO itb_prev_cde-men05.
            MOVE str_prev_pfc-men06 TO itb_prev_cde-men06.
     

    Hi
    You check in SM50 by executing the programing, You will come to know which select is taking more time and accordingly you modify that select.
    You can do SQL trace and Run time analysis and analyse and see.
    check this and use
    1) Dont use nested select statements
    2) If possible use for all entries in addition
    3) In the where addition make sure you give all the primary key
    4) Use Index for the selection criteria.
    5) You can also use inner joins
    6) You can try to put the data from the first select statement into an Itab and then in order to select the data from the second table use for all entries in.
    7) Use the runtime analysis SE30 and SQL Trace (ST05) to identify the performance and also to identify where the load is heavy, so that you can change the code accordingly
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5d0db4c9-0e01-0010-b68f-9b1408d5f234
    ABAP performance depends upon various factors and in devicded in three parts:
    1. Database
    2. ABAP
    3. System
    Run Any program using SE30 (performance analys) to improve performance refer to tips and trics section of SE30, Always remember that ABAP perfirmance is improved when there is least load on Database.
    u can get an interactive grap in SE30 regarding this with a file.
    also if u find runtime of parts of codes then use :
    Switch on RTA Dynamically within ABAP Code
    *To turn runtim analysis on within ABAP code insert the following code
    SET RUN TIME ANALYZER ON.
    *To turn runtim analysis off within ABAP code insert the following code
    SET RUN TIME ANALYZER OFF.
    Always check the driver internal tables is not empty, while using FOR ALL ENTRIES
    Avoid for all entries in JOINS
    Try to avoid joins and use FOR ALL ENTRIES.
    Try to restrict the joins to 1 level only ie only for tables
    Avoid using Select *.
    Avoid having multiple Selects from the same table in the same object.
    Try to minimize the number of variables to save memory.
    The sequence of fields in 'where clause' must be as per primary/secondary index ( if any)
    Avoid creation of index as far as possible
    Avoid operators like <>, > , < & like % in where clause conditions
    Avoid select/select single statements in loops.
    Try to use 'binary search' in READ internal table. Ensure table is sorted before using BINARY SEARCH.
    Avoid using aggregate functions (SUM, MAX etc) in selects ( GROUP BY , HAVING,)
    Avoid using ORDER BY in selects
    Avoid Nested Selects
    Avoid Nested Loops of Internal Tables
    Try to use FIELD SYMBOLS.
    Try to avoid into Corresponding Fields of
    Avoid using Select Distinct, Use DELETE ADJACENT
    Check the following Links
    Re: performance tuning
    Re: Performance tuning of program
    http://www.sapgenie.com/abap/performance.htm
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
    check the below link
    http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm
    See the following link if it's any help:
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
    Check also http://service.sap.com/performance
    and
    books like
    http://www.sap-press.com/product.cfm?account=&product=H951
    http://www.sap-press.com/product.cfm?account=&product=H973
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_PerformanceAnalysisTools.asp
    Performance tuning for Data Selection Statement
    http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm
    Debugger
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
    http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
    Run Time Analyser
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617cafe68c11d2b2ab080009b43351/content.htm
    SQL trace
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/801f7c454211d189710000e8322d00/content.htm
    CATT - Computer Aided Testing Too
    http://help.sap.com/saphelp_47x200/helpdata/en/b3/410b37233f7c6fe10000009b38f936/frameset.htm
    Test Workbench
    http://help.sap.com/saphelp_47x200/helpdata/en/a8/157235d0fa8742e10000009b38f889/frameset.htm
    Coverage Analyser
    http://help.sap.com/saphelp_47x200/helpdata/en/c7/af9a79061a11d4b3d4080009b43351/content.htm
    Runtime Monitor
    http://help.sap.com/saphelp_47x200/helpdata/en/b5/fa121cc15911d5993d00508b6b8b11/content.htm
    Memory Inspector
    http://help.sap.com/saphelp_47x200/helpdata/en/a2/e5fc84cc87964cb2c29f584152d74e/content.htm
    ECATT - Extended Computer Aided testing tool.
    http://help.sap.com/saphelp_47x200/helpdata/en/20/e81c3b84e65e7be10000000a11402f/frameset.htm
    Just refer to these links...
    performance
    Performance
    Performance Guide
    performance issues...
    Performance Tuning
    Performance issues
    performance tuning
    performance tuning
    You can go to the transaction SE30 to have the runtime analysis of your program.Also try the transaction SCI , which is SAP Code Inspector.
    1 Always check the driver internal tables is not empty, while using FOR ALL ENTRIES
    2 Avoid for all entries in JOINS
    3 Try to avoid joins and use FOR ALL ENTRIES.
    4 Try to restrict the joins to 1 level only ie only for 2 tables
    5 Avoid using Select *.
    6 Avoid having multiple Selects from the same table in the same object.
    7 Try to minimize the number of variables to save memory.
    8 The sequence of fields in 'where clause' must be as per primary/secondary index ( if any)
    9 Avoid creation of index as far as possible
    10 Avoid operators like <>, > , < & like % in where clause conditions
    11 Avoid select/select single statements in loops.
    12 Try to use 'binary search' in READ internal table. Ensure table is sorted before using BINARY SEARCH.
    13 Avoid using aggregate functions (SUM, MAX etc) in selects ( GROUP BY , HAVING,)
    14 Avoid using ORDER BY in selects
    15 Avoid Nested Selects
    16 Avoid Nested Loops of Internal Tables
    17 Try to use FIELD SYMBOLS.
    18 Try to avoid into Corresponding Fields of
    19 Avoid using Select Distinct, Use DELETE ADJACENT.
    Regards
    Anji

  • How can I sign up with Enterprise program, while I have an active membership of the iOS developer program?

    How can I sign up with Enterprise program, while I have an active membership of the iOS developer program?
    I have bought a memership for the iOS Developer program.
    I have created an in-house app.
    Now I want to publish it to all employees without registering the devices.
    So..
    I go to their website and try to sign up for the enterprise program, image shown below:
    http://s29.postimg.org/q06ylh5o6/Clipboard01.jpg
    Within the image above, I click continue...
    http://s14.postimg.org/46lqcpy74/Clipboard02.jpg
    Then I am taken to the image above, there I need to select a program, but I already have a program, the iOS developer program!  And the checkbutton of that program, is disabled. If I try to click continue at this page, without sleecting a program, a javascript-box shows "You have to select a program before continuging"...
    Do I need to unsubscribe my iOS developer program, to then register it again? Lol!
    PS: no clue where I should post this, looked over the forums and could not see anything related to singing up, registering for a program...

    Our apps came offline automatically shortly after this as iTunesConnect thought we had not renewed our license, even though we had several weeks ago.
    We had a brief panic as our apps were offline for 12 hours, which is how long it took Apple Support to work out what was wrong and hook things up. 
    I suggest you contact them ASAP to get this fixed so you don't get that iTunesConnect alert to your phone 'Your app status has been changed to Pending Contract'.

  • How to insert check box fields in a htmlb: tableview

    Hi,
    Can anybody tell me how to insert check box fields in a htmlb: tableview in a sequence of rows in a table view. How to generate the sequence no for the checkbox inorder to know the row that is checked.
    Thanks in advance,
    Aruna.

    Here is the code which has the custom "Checkbox" in the tableview & Triggers the event. <b>You can identify the checkbox based on cell ID (p_cell_id)</b> in the method "IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START" & Based on the event name + Cell ID. Look at the code & let me know if you any issue.
    <b>Layout:</b>
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content id               = "content"
                   design           = "design2002+design2003"
                   controlRendering = "SAP"
                   rtlAutoSwitch    = "true"
                   forceEncode      = "ENABLED" >
      <htmlb:page title="Test " >
        <htmlb:form>
          <%
      data TV_ITERATOR Type Ref To zcl_itr.
      data iterator type ref to IF_HTMLB_TABLEVIEW_ITERATOR.
      create object tv_iterator exporting appl_cons = application.
      iterator = tv_iterator.
          %>
          <htmlb:tableView id              = "fligts"
                           headerText      = "Flight"
                           width           = "100"
                           headerVisible   = "true"
                           design          = "alternating"
                           visibleRowCount = "10"
                           fillUpEmptyRows = "true"
                           showNoMatchText = "true"
                           filter          = "server"
                           sort            = "server"
                           onHeaderClick   = "MyEventHeaderClick"
                           table           = "<%= APPLICATION->itab %>"
                           iterator        = "<%= ITERATOR %>" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    <b>Event Handling:</b>
    DATA: EVENT_ID1 TYPE REF TO IF_HTMLB_DATA.
    EVENT_ID1 = CL_HTMLB_MANAGER=>GET_EVENT_EX( REQUEST ).
    CASE EVENT_ID1->EVENT_SERVER_NAME.
    IF NOT event_id1 IS INITIAL.
       if event_id1->server_event+0(9) = 'chkevent'.
      SPLIT event_id1->server_event AT '-' INTO v_event v_dummy v_row v_col.
      endif.
    endif.
    method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS.
         CLEAR p_column_definitions.
        CLEAR p_overwrites.
        DATA: tv_column  TYPE TABLEVIEWCONTROL.
        tv_column-COLUMNNAME  = 'FLDATE'.
        tv_column-edit        = 'X'.
        tv_column-sort        = 'X'.
        tv_column-TITLE               = 'Flight Date'.
        tv_column-WIDTH  = '100'.
        APPEND tv_column TO p_column_definitions.
        CLEAR tv_column.
        tv_column-edit        = 'X'.
        tv_column-COLUMNNAME          = 'CONNID'.
        tv_column-TITLE               = 'Conn.ID'.
        tv_column-WIDTH  = '70'.
        tv_column-HORIZONTALALIGNMENT = 'center'.
        APPEND tv_column TO p_column_definitions.
        CLEAR tv_column.
        tv_column-edit        = 'X'.
        tv_column-COLUMNNAME          = 'CHECKBOX1'.
        tv_column-TITLE               = 'Check Box'.
        tv_column-WIDTH  = '30'.
        tv_column-HORIZONTALALIGNMENT = 'center'.
        APPEND tv_column TO p_column_definitions.
    endmethod.
    METHOD IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
           DATA: L_EVENT TYPE STRING.
      CASE P_TABLEVIEW_ID.
        WHEN 'fligts'.
          CASE P_COLUMN_KEY.
            WHEN 'CHECKBOX1'.
    *          CONCATENATE 'chk_event' '123' '2323' INTO L_EVENT SEPARATED BY '-' .
    CONCATENATE 'chkevent' p_cell_id INTO l_event SEPARATED BY '-'.
              P_REPLACEMENT_BEE = CL_HTMLB_CHECKBOX=>FACTORY( ID = P_CELL_ID
            ONCLICK = L_EVENT CHECKED = 'false' ).
          ENDCASE.
      ENDCASE.
    ENDMETHOD.
    Hope this will solve your problem.
    <b><i>* Reward each helpful answer.</i></b>
    Raja T
    Message was edited by:
            Raja T

  • How to insert check box value in table?

    Hi all
    kindly help me how to insert check box value in database. what code i have to use as i am new in programing.
    thanx in advance

    Hi,
    There is no "Check box" in a table, a check box is a GUI (Graphical user interface) item.
    What you want is to store a boolean value in a table. For that you can use the varchar2(1) datatype and store Y or N. (or anything else)
    (you cannot define boolean as a datatype for a column).
    If you're using a front-end application like apex then it might be useful for you to read the documentation about chekc boxes :
    http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10497/check_box.htm#CHDDFBFH
    (for the rest if it's Oracle Forms then everything is already said).
    Edited by: user11268895 on Aug 17, 2010 10:44 AM

  • How to display check box in atable control

    hi
    here is my requirement
    how can i display check box in table control and also when i check that check box it has to dispaly one pop up screen with the records of table control row
    points will be rewarded
    Thanks&Regards
    Nagesh.Paruchuri

    Hi,
    See this code for how to display check box in atable control
    *---- Table declaration.
    TABLES: KNA1.
    CONTROLS TC1 TYPE TABLEVIEW USING SCREEN 200.
    CONTROLS TC2 TYPE TABLEVIEW USING SCREEN 300.
    *---- Data declaration.
    DATA:OKCODE LIKE SY-UCOMM.
    DATA:V_KNA1 LIKE KNA1.
    *DATA:ERROR TYPE C.
    *---- Internal Table declaration.
    DATA:BEGIN OF IT_TAB OCCURS 0,
          CHK,
          VBELN TYPE VBELN_VA,
          KUNNR TYPE KUNAG,
          ERDAT TYPE ERDAT,
          AUDAT TYPE AUDAT,
          VBTYP TYPE VBTYP,
         END OF IT_TAB.
    DATA:BEGIN OF IT_TAB1 OCCURS 0,
          VBELN TYPE VBELN_VA,
          POSNR TYPE POSNR_VA,
          MATNR TYPE MATNR,
          MATWA TYPE MATWA,
          PMATN TYPE PMATN,
         END OF IT_TAB1.
    *&      Module  USER_COMMAND_0100  INPUT
    MODULE USER_COMMAND_0100 INPUT.
      OKCODE = SY-UCOMM.
      CASE OKCODE.
        WHEN 'DISP' OR SPACE.
          SELECT *
             FROM VBAK
             INTO  CORRESPONDING FIELDS OF TABLE IT_TAB
             WHERE KUNNR = KNA1-KUNNR.
          IF SY-SUBRC <> 0.
            MESSAGE 'No sales document exists'(001) TYPE 'I'.
          ENDIF.
          LEAVE TO SCREEN 200.
          CLEAR OKCODE.
    *--- To leave Transaction
        WHEN 'BACK' .
          LEAVE PROGRAM.
          CLEAR OKCODE.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  validate_kunnr  INPUT
    MODULE VALIDATE_KUNNR INPUT.
      V_KNA1 = KNA1.
      SELECT SINGLE *
        FROM KNA1
       WHERE KUNNR = KNA1-KUNNR.
    *-----Process error condition
      IF SY-SUBRC <> 0.
        CLEAR KNA1.
        KNA1-KUNNR = V_KNA1-KUNNR.
        CASE OKCODE..
          WHEN 'BACK' OR 'EXIT' .
            LEAVE PROGRAM.
        ENDCASE.
        MESSAGE 'Customer Does Not Exist'(002) TYPE 'I'.
        LEAVE TO SCREEN 100.
      ENDIF.
    ENDMODULE.                 " validate_kunnr  INPUT
    *&      Module  STATUS_0100  OUTPUT
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'PF'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0200  INPUT
    MODULE USER_COMMAND_0200 INPUT.
      CASE OKCODE.
        WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
          LEAVE TO SCREEN 100.
          CLEAR OKCODE.
          CLEAR IT_TAB1.
        WHEN 'DISP' .
          CLEAR OKCODE.
          READ TABLE IT_TAB WITH KEY CHK = 'X'.  
       IF SY-SUBRC = 0.
            SELECT  VBELN   POSNR  MATNR MATWA PMATN
         FROM VBAP
         INTO  TABLE IT_TAB1
         WHERE VBELN = IT_TAB-VBELN.
            IF SY-SUBRC = 0.
              SORT IT_TAB.
              DESCRIBE TABLE IT_TAB LINES TC1-LINES.
              LEAVE TO SCREEN 300.
            ELSE.
              MESSAGE E016(YBHV).
            ENDIF.
          ELSE.
            MESSAGE 'Please select one record' TYPE 'I'.
          ENDIF.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0200  INPUT
    *&      Module  STATUS_0200  OUTPUT
    MODULE STATUS_0200 OUTPUT.
      SET PF-STATUS 'PF3'.
    ENDMODULE.                 " STATUS_0200  OUTPUT
    *&      Module  USER_C.OMMAND_0300  INPUT
          text
    MODULE USER_COMMAND_0300 INPUT.
      SET PF-STATUS 'PF3'.
      CASE OKCODE.
        WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
          CLEAR OKCODE.
          LEAVE TO SCREEN 200.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0300  INPUT
    *&      Module  modify  INPUT
    MODULE MODIFY INPUT.
      MODIFY IT_TAB INDEX TC1-CURRENT_LINE.
    ENDMODULE.                 " modify  INPUT
    *&      Module  okcode  OUTPUT
          text
    MODULE OKCODE OUTPUT.
      CLEAR OKCODE.
    ENDMODULE.                 " okcode  OUTPUT
    Reward Pointsa If usefull
    Regards
    Fareedas

  • 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.

Maybe you are looking for