Is manipulating the fields of tcp/ip header possible

I want to get packets at n/w level and manipulate them
Is it possible in Java, If so plz help

uma_mahesh wrote:
I want to get packets at n/w level and manipulate them
Is it possible in JavaNo.
Please visit us again soon.

Similar Messages

  • One of the field is disabled(input not possible) after upgrade in FPE1

    Hi ABAP Gurus,
      I am working on FPE1 Transaction Code and i just find out that after upgrade one of the field  on screen is not input possible but before upgrade we have that field as input/output  possible .
    so now we want same functionality what we have before . so which path do i need to follow because its standard screen .
    any suggestion is appreciated .
    Thanks,
    Jack
    Edited by: jack troy on Jun 24, 2009 7:36 PM

    Hi Ajay,
    Thanks for your reply . My question is can we enable field for input using transaction variant .because if i go to screen layout for FPE1 ,  i can see that this field is only output possible .
    Thanks,
    Jack

  • Error While Linking Formula field for Repetetive Area Header In PLD

    Hi All,
    I am having a problem in pld..Let me explain...!!!!
    I have a drop down field called Billing Type....My requirement is if the billing type in Time based then it should become number of Hours,if my billing type is Trip based then my Quantity column should become no of trips .I got the logic but when i am linking the formula field with the header in the repetetive area it is not working,but when i paste it some where else it is working,Please tell me any solution for this...!!!my version is 8.81 PL20
    Regards
    Cherry

    Hi Cherry,
    Any formula fields you use in your logic must be on the same area as the linked fields. In your case - as I understand you are trying to link row level fields to a formula based on a header level UDF. What you need to do is to move all your hidden fields used in the formula to the Repetitive Area - don't worry if the field used is actually header level, it still should be fine.
    I would advise not to hide any fields used in a formula until you are 100% sure it's working - as you can then check if all of them show the results you expect. For instance in this case you could see that the header UDF displayed in the Repetitive Area is repeated in every line and so any formulas based on this field will work well.
    I hope this helps.
    Regards,
    Nat

  • How to check the field existence in a string at Header level?

    Hello,
    I have a bunch of fields on my_form, just for example here in this posting I am using US state names ....., say for example,
    I have 3 fields, their names are as below
    1) NY,
    2) CA, 
    3) TX
    I placed a hidden a text field, its name is GFL (i mean, Grey Fields List), am using this GFL for my programming purpose
    From the back end (in our case, its an ERP -SAP) am populating/filling this GFL field, say for example.... its data looks like, CA TX (i mean, am concatenating the state names with a seperation of a space)
    ( FYI.....Already i have some JS piece in my_form INITIALIZATION and docReady events for some other purposes)
    Now, my requirement is as below,
    1) LOOP all the FIELD objects (here they are as State names) of my_form , then check whether their name (NY) existing in GFL's data..........if exisitng (in our case, its not existing) pls. greyed out with readOnly.......... if not existing
    (in our case, its not existing)   then skip the coloring and readOnly, go to next loop / iteration / state / Field
    Actually, i can achieve my requirement by putting JS in each field objet's INITIALIZATION event itslef as below, (but, i have around 200 feilds in my_form, hence i would like to put at HEADER level by generically looping all the field objects in my_form in one piece of code),
    var myStateName = /NY/;
    var returnValue = GFL.search(myStateName);
    if(returnValue != -1){; // This state/field/object is found in the Grey Fields List, hence greyed out with readOnly
    this.ui.oneOfChild.border.fill.color.value = "192,192,192";
    this.access = "readOnly";
    For some other requirement one of expert has provided the below JS in these forums, as below
    function findNodes(vNode) {
        if (vNode.className === "field") {
                       if (vNode.isPropertySpecified("name") === true) {
                                      if (vNode.getAttribute("name").search(/_U$/g) !== -1) {
                                          // Script to execute, when a match was found
        for (var i = 0; i < vNode.nodes.length; i += 1) {
            findNodes(vNode.nodes.item(i));
    findNodes(xfa.form);
    Actually, I tried to change the above JS as per my requirement, but its not working, pls. provide me correct JS as per my requirement
    Thank you

    Try this:
    function findNodes(vNode){
         if (vNode.className === "field"){
              if (vNode.isPropertySpecified("name")===true){
                   var myStateName=new RegExp(vNode.name);
                   var returnValue = GFL.search(myStateName);
                   if (returnValue!=-1){
                        this.ui.oneOfChild.border.fill.color.value="192,192,192";
                        this.access="readOnly";
                   else{  
                        this.ui.oneOfChild.border.fill.color.value="255,255,255";//whatever colour is open access
                        this.access="open";
         for (var a=0;a<vNode.nodes.length;a++){
              findNodes(vNode.nodes.item(a));
    findNodes(xfa.form);
    Kyle

  • Pages 5.2 How do I remove the fields in the header and footer?

    I need to add objects and footers that are longer than the field dividers allow in the header and footer of my document. How do I remove the field divisions?

    You can't remove the dividers in Pages 5.
    They don't exist in Pages '09.
    On the Mac you can simply keep typing and the text crosses the dividers.
    A quick test on my iPod touch suggests the same on iOS.
    Peter

  • How to update the field 'VBRK-ZUONR' of Billing Document Header(VF03)

    Hi Experts.
    I got a request to update the field 'VBRK-ZUONR' of Billing Document Header(T-code:VF03).
    At first i thought it might be a BADI or User-Exit case and looked up in Standard Program but found nothing.
    Thus i doubted if it was a configuration problem.
    I tryed to configure through transaction code "VTFA" "VTFL" "VTFF" and met another failure.
    Now i'm totally lost and hope for your advice,any information would be appreciated.
    The Billing Document is automatically generated from the posting of Outbound Delivery.
    Regards.
    Panda.

    Hi friends.
    I've found where point is.
    The include program 'RV60AFZC' contains a form named 'USEREXIT_FILL_VBRK_VBRP',
    in which the field 'VBRP-ZUONR' could be set through coding.
    In our system the codes had been changed once,which led to the misalignment that confused me yesterday.
    On the other hand,undoubtedly VTFL is available to configure the value of 'VBRP-ZUONR'.
    For more information plz refer to
    http://help.sap.com/saphelp_46c/helpdata/en/18/f62c7dd435d1118b3f0060b03ca329/content.htm
    Thanks again to all of you.
    Best Regards
    Panda.

  • Header Information Including a Max(FieldN) and then Pulling the field(Date) When Max Occurred

    Post Author: Skyeyes
    CA Forum: General
    Can anyone assist us as we have several columns we are displaying. One column called FieldN we gather the MAX from the column and want to place the Max(FieldN) in the header--this works.  Also next to FieldN where it is MAX we want to pull the field(Date) that MAX happened.  When we do the formula, it pulls the first date in the list, not of the MAX.
    MAX(FieldN)  & (Date)
    Any ideas would be helpful.  Thanks.

    Post Author: yangster
    CA Forum: General
    Give this a trystringvar fieldNDate := totext(FieldN)&totext(DATE);stringvar maxDate := nthlargest(1, fieldNDate);stringvar Datedisplay := right(maxDate, 6);so essentially you are trying to find the max date associated with the max fieldNthe nthlargest will find you the largest fieldN and its associated date since there could be multiple dates associated with the max fieldN fieldthe last string is just to strip the field and display only the datethis should work out you might have to tinker with the right to get your formatting.

  • How to activate the "Set Exchange Rate" field in billing document header?

    Dear All,
    I would like to get the exchange rate at the time of the billing without changing the sales order exchange value.
    The set exchange rate field is grayed off.
    Thanks in adavance.
    Regards,
    Niketan

    Hi,
    This can be achieved using the copy control setting for billing at the Item level. The field is: PricingExchRate type
    and the possible values relevant for you are:
    C     Exchange rate determination according to billing date
    E     Exchange rate determination according to current date
    Hope this helps!
    Thanks
    Siva

  • How can I know the end of TCP stream and/or SOAP over HTTP flow

    Hi all!
    I want to read SOAP messages over HTTP, from sniffed TCP fragments.
    How can I decide that the TCP and/or the HTTP fragmenst finished?
    For example there is a SOAP message sliced to 5 TCP packets, and the first packet contains the HTTP header and some SOAP content too. The last packet contains the SOAP XML's ending XML-tag </soap:Envelope>.
    I don't want to watch every packet's end like "if the end string is </soap:Envelope> then it is the last packet", I just simply want to know which is the last packet of that message.
    The TCP connection won't be closed after the message arrives, and let's say the HTTP header doesn't contain a Content-Length field.

    A TCP connection is just a stream of bytes. It doesn't care what those bytes are. HTTP is built on top of TCP and specifies the ability to make a request without closing the connection (HTTP 1.1 Keep Alive). So you need to understand the HTTP protocol, understand whether it's a Keep Alive connection or not, and then do the same thing a browser would to do understand when a reply has been completed and the connection is available for the next request. Otherwise, you'll just look like you're getting loads of unrelated data as you sniff the connection. Oh, and you'll probably need to understand the HTTP chunking protocol too.

  • Whether the fields of a single row in an internal table has got value.

    I am doing an archiving report in PS Module.
    The table RPSCO has 12 fields which represent each month.The records in the table are based on OBJNR  and YEAR
    Now i need to check for the latest year which month has some value .If any of the month  has got some value i need to take that month.
    Sample table given below.
    OBJNR           year    Month1    month2      month3    so on
    1)PR00002409  2006     0.00     0.00     664.70-     0.00 0.00     0.00     0.00     0.00     0.00                                                                      
    0.00     0.00     0.00     0.00
    2)PR00002409  2005     0.00     0.00     0.00     0.00     0.00     0.00     0.00 0.00     0.00     0.00     48.70     127.20     0.00
    In this case the output should be Month3.Because the latest year is 2006 and Month is Month3.

    Hi Susmita,
    You have to use DO VARYING option from field 3 onwards.
    Below is the sample program to check whether the field has a value or not.
    tables: rpsco.
    data: it_rpsco like rpsco occurs 0 with header line.
    data: v_wlp type rpsco-wlp00,
          v_wtp type rpsco-wtp00,
          v_pos type i.
    select * from rpsco into table it_rpsco where gjahr = '2007'.
    if lines( it_rpsco ) gt 0.
    loop at it_rpsco.
      clear v_pos.
      do 16 times varying v_wlp from it_rpsco-wlp00 next it_rpsco-wlp01
                  varying v_wtp from it_rpsco-wtp00 next it_rpsco-wtp01.
       v_pos = v_pos + 1.
       if not v_wlp is initial.
         write:/5 v_pos , 35 v_wlp, 70 v_wtp.
         exit.
       endif.
      enddo.
    endloop.
    endif.
    Regards,
    Kumar Bandanadham
    Edited by: Velangini Showry Maria Kumar Bandanadham on Jun 1, 2009 9:30 AM

  • When clic in the field "i_ekpo-ebeln" tab exit in report ALV

    Good Afternoon! *********************************************************
    Coloquei all the code, I believe for better clarification. When clico in the field i_ekpo-ebeln in the report is called transaction ME23 c/o GRID this functioning normally, but with the reports List and Hierarquico it does not happen the same and it prints in the baseboard the message "Invalid Function". when standard use buttons, functions of course.
    obs.: I had that to create a SET Pf-status for each type of report pos I wanted that when clicar in the field box and clicar in the button "TO PRINT REPORT" it printed sapscript. How I make to solve such problem?
    Att, Carlos Eduardo.
    REPORT ztreino NO STANDARD PAGE HEADING LINE-SIZE 220.
    ************************declarações*********************
    DATA: BEGIN OF y_ekko OCCURS 0,
            ebeln TYPE ekko-ebeln,  "Nº documento de compra
            bukrs TYPE ekko-bukrs,  "Empresa
            bsart TYPE ekko-bsart,  "Documento de compra
            loekz TYPE ekko-loekz,  "Código de eliminação
            aedat TYPE ekko-aedat,  "Data de criação do registro
            ernam TYPE ekko-ernam,  "Nome do responsável que criou o objeto
            lifnr TYPE ekko-lifnr,  "Nº conta do fornecedor
            ekgrp TYPE ekko-ekgrp,  "Grupo de compradores
            waers TYPE ekko-waers,  "Chave da moeda
            BOX   TYPE ptrv_approval-box, "campo para chekinbox
          END OF y_ekko,
          BEGIN OF y_ekpo OCCURS 0,
            ebeln TYPE ekpo-ebeln,  "Nº documento de compra
            ebelp TYPE ekpo-ebelp,  "Nº item do documento de compra
            loekz TYPE ekpo-loekz,  "Código de eliminação
            txz01 TYPE ekpo-txz01,  "Texto breve
            matnr TYPE ekpo-matnr,  "Nº material
            bukrs TYPE ekpo-bukrs,  "Empresa
            werks TYPE ekpo-werks,  "Centro
            menge TYPE ekpo-menge,  "Quantidade do pedido
            netpr TYPE ekpo-netpr,  "Preço líquido no documento de compra
            BOX   TYPE ptrv_approval-box, "campo para chekinbox
          END OF y_ekpo.
    *início seleção de dados
    SELECTION-SCREEN BEGIN OF BLOCK bl2 WITH FRAME TITLE text-000.
    SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP.
                                    *Nº documento de compra
    SELECT-OPTIONS : s_ebeln FOR ekko-ebeln NO INTERVALS OBLIGATORY,
                     s_bukrs FOR ekko-bukrs OBLIGATORY,  "Empresa
                     s_bsart FOR ekko-bsart.  "Documento de compra
    SELECTION-SCREEN END OF BLOCK bl1.
    SELECTION-SCREEN END OF BLOCK bl2.
    **fim da seleção de dados----
    **início da variante
    SELECTION-SCREEN BEGIN OF BLOCK bl4 WITH FRAME TITLE text-000.
    SELECTION-SCREEN BEGIN OF BLOCK bl3 WITH FRAME TITLE text-002.
    PARAMETERS : p_vari LIKE disvariant-variant.
    SELECTION-SCREEN END OF BLOCK bl3.
    SELECTION-SCREEN END OF BLOCK bl4.
    ***fim variante -
    ***início modo relatório
    SELECTION-SCREEN BEGIN OF BLOCK bl5 WITH FRAME TITLE text-000.
    SELECTION-SCREEN BEGIN OF BLOCK bl6 WITH FRAME TITLE text-003.
    SELECTION-SCREEN SKIP.
      PARAMETERS : rb1 RADIOBUTTON GROUP TIPO DEFAULT 'X',
                   rb2 RADIOBUTTON GROUP TIPO,
                   rb3 RADIOBUTTON GROUP TIPO.
    SELECTION-SCREEN END OF BLOCK bl6.
    SELECTION-SCREEN END OF BLOCK bl5.
    ****fim modo relatório
    *******início da opção de download
    Dados do arquivo texto de saída.
    SELECTION-SCREEN BEGIN OF BLOCK bl9 WITH FRAME TITLE text-004.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(15) text-005.
    PARAMETERS: p_gerar  AS CHECKBOX.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(15) text-006.
    PARAMETERS: p_dir  LIKE rlgrap-filename DEFAULT 'c:'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(15) text-007.
    PARAMETERS: p_arq  LIKE rlgrap-filename DEFAULT 'nota-geral.txt'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK bl9.
    DATA :
          i_ekko  LIKE     y_ekko OCCURS 0 WITH HEADER LINE,
          i_ekpo  LIKE     y_ekpo OCCURS 0 WITH HEADER LINE.
         i_tabsaida LIKE  y_saida OCCURS 0 WITH HEADER LINE.
    *********************Fim Declarações*******************************
    *********************Declarações ALV*******************************
    TYPE-POOLS : slis.
    DATA :
           s_layout    TYPE  slis_layout_alv,
           t_sort      TYPE  slis_t_sortinfo_alv WITH HEADER LINE,
           t_fieldcat  TYPE  slis_t_fieldcat_alv WITH HEADER LINE,
           s_grupos    TYPE  slis_t_sp_group_alv WITH HEADER LINE,
           s_keyinfo   TYPE  slis_keyinfo_alv,
           extab       TYPE  slis_t_extab.
    DATA :
           variant_exit(1) TYPE  c,
           def_variant(1)  TYPE  c,
           s_print      TYPE  slis_print_alv,
           s_top        TYPE  slis_t_listheader,
           variante     TYPE  disvariant,
           def_variante TYPE  disvariant,
           v_repid      LIKE  sy-repid,
    *------pega a data que esta rodando a transação
           v_datasaida(10)  TYPE C,
    *------para saber quantos Pedidos na EKKO
           v_exibe      TYPE I,
           s_selfield type slis_selfield,
           v_ucomm like sy-ucomm.
    **********************Fim declarações ALV*************************
                   Contants para Sapscript e declarações                 *
    TABLES: ITCPO.
    CONSTANTS:  c_on(1)  TYPE  C  VALUE  'X',    "Parâmetro para o Sapscript
                c_off(1) TYPE  C  VALUE  ''.     "Parâmetro para o Sapscript
    Data:
          v_element(15) TYPE C,  "Elemento de texto do Sap Script
          v_type(15)    TYPE C,  "BODY
          v_window(15)  TYPE C,  "Janela
          flag          TYPE I,  "Uma condição para impressão do sapscript
          resp          TYPE C,  "resposta para confirmação do download tab
          zlen          TYPE I,  "Para verificar o um diretório válido
    Para a função WS_DOWNLOAD só em declarar as variaveis deste tipo já *
    seria o bastante para passar o caminho para a função
    TABLES : ekko, ekpo.
                       initialization                                    *
    INITIALIZATION.
      PERFORM zf_verifica_variante.
                   at selection-screen on value-request                  *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
      PERFORM zf_busca_variante_existente.
                 at seletion-screen                                      *
    AT SELECTION-SCREEN.
      PERFORM zf_valida_variante.
    validar os campo antes de fazer download do arquivo
      PERFORM zf_trata_parametros_gerar_arqu.
                start-of-selection                                       *
    START-OF-SELECTION.
      PERFORM zf_seleciona_dados.
                       Criando ALV                                       *
      PERFORM zf_alv.
    *&      Form  zf_verifica_variante
          text
    -->  Verifica se a variante selecionada é existente
    FORM zf_verifica_variante.
      CLEAR variante.
      v_repid = sy-repid.
      variante-report = v_repid.
    Buscar variante default
      def_variante = variante.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
           EXPORTING
                i_save        = 'A'
           CHANGING
                cs_variant    = def_variante
           EXCEPTIONS
                wrong_input   = 1
                not_found     = 2
                program_error = 3
                OTHERS        = 4.
      IF sy-subrc EQ 0.
        p_vari = def_variante-variant.
      ENDIF.
    ENDFORM.                    " zf_verifica_variante
    *&      Form  zf_busca_variante_existente
    *-       text
    *-  --> Vai buscar a variante existente
    FORM zf_busca_variante_existente.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
           EXPORTING
                is_variant          = variante      " Report com as
                i_save              = 'A'           " Variantes Salvas
                i_tabname_header    = 'I_EKPO'      " Tabela interna saida
                it_default_fieldcat = t_fieldcat[]  " Tabela de formatação
                i_display_via_grid  = 'X'  " Dispara POPUP em ALV
           IMPORTING
                e_exit           = variant_exit  " Se não existir variante X
                es_variant       = def_variante     " Variante default
           EXCEPTIONS
                not_found           = 1
                program_error       = 2
                OTHERS              = 3.
      IF sy-subrc = 2.
          MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        IF variant_exit = space.
          p_vari = def_variante-variant. " Recebe variante escolhida
        ENDIF.
      ENDIF.
    ENDFORM.                    " zf_busca_variante_existente
    *-&      Form  zf_valida_variante
    *-       text
    *-  -->  Verifica se a variante digitada é válida.
    FORM zf_valida_variante.
      IF NOT p_vari IS INITIAL.
        variante             =     def_variante.    "nome do report
        def_variante-variant =     p_vari.          "nome que foi digitado
        CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
             EXPORTING
                  i_save     = 'A'
             CHANGING
                  cs_variant = def_variante
                  variante   = def_variante.
      ELSE.
        clear variante.
        variante-report = v_repid.
      ENDIF.
    ENDFORM.                    " zf_valida_variante
    -&      Form  zf_seleciona_dados
    *-       text
    -->  Seleciona os dados da ekko e ekpo
    FORM zf_seleciona_dados.
      SELECT ebeln
           bukrs
           bsart
           loekz
           aedat
           ernam
           lifnr
           ekgrp
           waers
            FROM ekko
            INTO TABLE i_ekko
            WHERE
                 ( ebeln IN s_ebeln AND
                   bsart EQ 'NB' ).
    SORT I_EKKO ASCENDING.
      IF sy-subrc EQ 0.
        SELECT ebeln
               ebelp
               loekz
               txz01
               matnr
               bukrs
               werks
               menge
               netpr
                FROM ekpo
                INTO TABLE i_ekpo
                FOR ALL ENTRIES IN i_ekko
                WHERE
                     ( ebeln EQ i_ekko-ebeln ).
      ENDIF.
    SORT I_EKPO ASCENDING.
    Para exibir no topo do relatório no grid
    DESCRIBE TABLE I_EKKO LINES v_exibe.
    ENDFORM.                    " zf_seleciona_dados
    *-&      Form  zf_ALV
    *-       text
    -->  Opções de alv
    FORM zf_alv.
    IF rb1 = 'X'.
              PERFORM zf_gri.
    ENDIF.
    IF rb2 = 'X'.
              PERFORM ZF_HIERARQUICO.
    ENDIF.
    IF rb3  =  'X'.
              PERFORM ZF_LIST.
    ENDIF.
    ENDFORM.                    " zf_ALV
    *&      Form  zf_gri
    *-       text
    *-  -->  Seqüência para gerar o alv grid
    FORM zf_gri.
      PERFORM zf_layout.
      PERFORM zf_ordena_campos.
      PERFORM zf_monta_campos_alv.
      PERFORM zf_print.
      PERFORM zf_grupo.
      PERFORM zf_top  USING  s_top.
      IF  NOT  I_EKPO[] IS INITIAL.
        PERFORM zf_imprime_alv.
      ELSE.
        MESSAGE s000(zcl001)  WITH  'Nenhum registro encontrado.'.
        STOP.
      ENDIF.
    ENDFORM.                    " zf_gri
    *-&      Form  zf_layout
    *-       text
    -->  cria o layout do alv
    FORM zf_layout.
      s_layout-box_tabname          = 'I_EKPO'.
      s_layout-box_fieldname        = 'BOX'.
      s_layout-get_selinfos         =  'X'.
      s_layout-detail_popup         =  'X'.
      s_layout-detail_initial_lines =  'X'.
      s_layout-zebra                =  'X'.
      s_layout-colwidth_optimize    =  'X'.
    ENDFORM.                    " zf_layout
    *-&      Form  zf_ordena_campos
    *-       text
    -->  Ordenação dos campos
    FORM zf_ordena_campos.
      CLEAR t_sort.
      t_sort-spos      =  '1'.          "prioridade de ordenação
      t_sort-fieldname =  'EBELN'.      "campo da tab int. de saida
      t_sort-tabname   =  'I_EKPO'.     "tab inter de saida
      t_sort-up        =  'X'.          "ordenação do maior para o menor
      APPEND t_sort.
    ENDFORM.                    " zf_ordena_campos
    *-&      Form  zf_monta_campos_alv
          text
    -->  è passado os campos de acordo com a ordem de exibição inicial
    FORM zf_monta_campos_alv.
    IF rb2  =  'X'.
      CLEAR t_FIELDCAT.
      t_FIELDCAT-FIELDNAME      =  'BOX'.
      t_FIELDCAT-TABNAME        =  'I_EKKO'.
      t_FIELDCAT-CHECKBOX       =  'X'.
      t_FIELDCAT-INPUT          =  'X'.
      APPEND t_FIELDCAT.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname      =  'EBELN'.
      t_fieldcat-tabname        =  'I_EKKO'.
      t_fieldcat-ref_fieldname  =  'EBELN'.
      t_fieldcat-ref_tabname    =  'EKKO'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname      =  'BUKRS'.
      t_fieldcat-tabname        =  'I_EKKO'.
      t_fieldcat-ref_fieldname  =  'BUKRS'.
      t_fieldcat-ref_tabname    =  'EKKO'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname      =  'BSART'.
      t_fieldcat-tabname        =  'I_EKKO'.
      t_fieldcat-ref_fieldname  =  'BSART'.
      t_fieldcat-ref_tabname    =  'EKKO'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname      =  'AEDAT'.
      t_fieldcat-tabname        =  'I_EKKO'.
      t_fieldcat-ref_fieldname  =  'AEDAT'.
      t_fieldcat-ref_tabname    =  'EKKO'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname      =  'ERNAM'.
      t_fieldcat-tabname        =  'I_EKKO'.
      t_fieldcat-ref_fieldname  =  'ERNAM'.
      t_fieldcat-ref_tabname    =  'EKKO'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname      =  'LIFNR'.
      t_fieldcat-tabname        =  'I_EKKO'.
      t_fieldcat-ref_fieldname  =  'LIFNR'.
      t_fieldcat-ref_tabname    =  'EKKO'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname      =  'EKGRP'.
      t_fieldcat-tabname        =  'I_EKKO'.
      t_fieldcat-ref_fieldname  =  'EKGRP'.
      t_fieldcat-ref_tabname    =  'EKKO'.
      APPEND t_fieldcat.
    ENDIF.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname      =  'EBELN'.
      t_fieldcat-tabname        =  'I_EKPO'.
      t_fieldcat-ref_fieldname  =  'EBELN'.
      t_fieldcat-ref_tabname    =  'EKPO'.
      t_fieldcat-key            =  'X'.
      t_fieldcat-Hotspot        =  'X'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      T_fieldcat-fieldname     = 'EBELP'.
      T_fieldcat-tabname       = 'I_EKPO'.
      T_fieldcat-ref_fieldname = 'EBELP'.
      T_fieldcat-ref_tabname   = 'EKPO'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname      =  'MATNR'.
      t_fieldcat-tabname        =  'I_EKPO'.
      t_fieldcat-ref_fieldname  =  'MATNR'.
      t_fieldcat-ref_tabname    =  'EKPO'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname      =  'WERKS'.
      t_fieldcat-tabname        =  'I_EKPO'.
      t_fieldcat-ref_fieldname  =  'WERKS'.
      t_fieldcat-ref_tabname    =  'EKPO'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname      =  'MENGE'.
      t_fieldcat-tabname        =  'I_EKPO'.
      t_fieldcat-ref_fieldname  =  'MENGE'.
      t_fieldcat-ref_tabname    =  'EKPO'.
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname      =  'NETPR'.
      t_fieldcat-tabname        =  'I_EKPO'.
      t_fieldcat-ref_fieldname  =  'NETPR'.
      t_fieldcat-ref_tabname    =  'EKPO'.
      t_fieldcat-do_sum         =  'X'. "totalizar campo
      APPEND t_fieldcat.
      CLEAR t_fieldcat.
      t_fieldcat-fieldname      =  'TXZ01'.
      t_fieldcat-tabname        =  'I_EKPO'.
      t_fieldcat-ref_fieldname  =  'TXZ01'.
      t_fieldcat-ref_tabname    =  'EKPO'.
      APPEND t_fieldcat.
    ENDFORM.                    " zf_monta_campos_alv
    *-&      Form  zf_top
    *-       text
    *-  --> Cria o texto de cabeçalho do ALV, passando por parametro o
    --> p_S_TOP para s_top
    FORM zf_top USING p_s_top  TYPE slis_t_listheader.
      DATA: ls_line  TYPE  slis_listheader.
      CLEAR  ls_line.
      ls_line-typ  =  'H'.
      ls_line-info  =  'Relatório de Compras por Classificação Contábil'.
      APPEND ls_line  TO  p_s_top.
      CLEAR  ls_line.
      ls_line-typ  =  'S'.
      ls_line-KEY  =  'Parametros Seleção '.
      ls_line-info  = '- Documento de compra'.
      APPEND ls_line  TO  p_s_top.
      CLEAR  ls_line.
      ls_line-typ  =  'S'.
      ls_line-info  = '- Empresa'.
      APPEND ls_line  TO  p_s_top.
      CLEAR  ls_line.
      ls_line-typ  =  'S'.
      ls_line-info  = '- Tip.doc.compra'.
      APPEND ls_line  TO  p_s_top.
      CLEAR  ls_line.
      ls_line-typ  =  'S'.
      ls_line-KEY  =  'Total Pedido'.
      ls_line-info  = v_exibe.
      APPEND ls_line  TO  p_s_top.
    início Formatar a data
      CALL FUNCTION 'DATUMSAUFBEREITUNG'
       EXPORTING
         IDATE                 = SY-DATUM
       IMPORTING
         TDAT8                 = v_datasaida.
    Fim Formatar a data
      CLEAR  ls_line.
      ls_line-typ  =  'S'.
      ls_line-KEY  =  'Data da execução'.
      ls_line-info  = v_datasaida.
      APPEND ls_line  TO  p_s_top.
      CLEAR  ls_line.
      ls_line-typ  =  'S'.
      ls_line-KEY  =  'Usuário'.
      APPEND ls_line  TO  p_s_top.
      CLEAR  ls_line.
      ls_line-typ  =  'A'.
      ls_line-info  = sy-uname.
      APPEND ls_line  TO  p_s_top.
    ENDFORM.                    " zf_top
    *-&      Form  zf_print
    *-       text
    *-  -->  Parametros de Impressão para o ALV
    FORM zf_print.
      s_print-no_print_selinfos     =  'N'.
      s_print-no_print_listinfos    =  'N'.
    ENDFORM.                    " zf_print
    *-&      Form  zf_imprime_alv
    *-       text
    *-  -->  Imprime o ALV c/ seu parametros
    FORM zf_imprime_alv.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         I_CALLBACK_PF_STATUS_SET          = 'ZSET_PF_STATUS'
         I_CALLBACK_USER_COMMAND           = 'ZF_USER_COMMAND'
         i_callback_program                = v_repid
         i_callback_top_of_page            = 'TOP_OF_PAGE'
         is_layout                         =  s_layout
         it_fieldcat                       =  t_fieldcat[]
        IT_EXCLUDING                      =
         IT_SPECIAL_GROUPS                 = S_GRUPOS[]
         it_sort                           = t_sort[]
        IT_FILTER                         =
        IS_SEL_HIDE                       =
         i_default                         = 'X'
         i_save                            = 'A'
         is_variant                        = variante
        IT_EVENTS                         =
        IT_EVENT_EXIT                     =
         IS_PRINT                          = S_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                 =
      IMPORTING
        E_EXIT_CAUSED_BY_CALLER           =
        ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = I_EKPO
       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.                    " zf_imprime_alv
    *-&      Form  zf_top-of-page
    *-       text
    -->  Cabeçalho ALV
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
                it_list_commentary       = s_top
                i_logo                   = 'CARLOS_LOGO3'.
      I_END_OF_LIST_GRID       = .
    ENDFORM.                    " zf_top-of-page
    *-&      Form  ZF_HIERARQUICO
    *-       text
    *-  -->  RELATÓRIO HIERÁQUICO
    form ZF_HIERARQUICO.
      PERFORM zf_layout.
      PERFORM zf_ordena_campos.
      PERFORM zf_monta_campos_alv.
      PERFORM zf_print.
      PERFORM zf_grupo.
      IF  NOT  I_EKPO[] IS INITIAL.
        PERFORM zf_imprime_hierarquico_alv.
      ELSE.
        MESSAGE s000(zcl001)  WITH  'Nenhum registro encontrado.'.
        STOP.
      ENDIF.
    endform.                    " ZF_HIERARQUICO
    *-&      Form  zf_grupo
         text
    -->  Não é fundamental a criação de grupos de campos, mas facilita
    ao usuário na hora de escolher os campos de exibição após o clique do
    botão MODIFICAR LAYOUT . Vários campos da fieldcat podem ser
    definidos para um mesmo grupo de campo.
    form zf_grupo.
    MOVE:'Moeda' TO S_GRUPOS-SP_GROUP,
         'Campos moeda' TO S_GRUPOS-TEXT.
         APPEND S_GRUPOS.
    endform.                    " zf_grupo
    *&      Form  zf_imprime_hierarquico_alv
          text
    -->  p1        text
    <--  p2        text
    form zf_imprime_hierarquico_alv.
    Vamos definir as ligações entre as tabelas para as quebras no momento
    da impressão.
      s_keyinfo-header01  =  'EBELN'.
      s_keyinfo-item01    =  'EBELN'.
      CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
        EXPORTING
          I_CALLBACK_USER_COMMAND           = 'ZF_USER_COMMAND'
         I_CALLBACK_PF_STATUS_SET          = 'ZF_SET_PF_STATUS_HIERARQ'
          I_CALLBACK_PROGRAM                = v_repid
          IS_LAYOUT                         = S_LAYOUT
          IT_FIELDCAT                       = T_FIELDCAT[]
          IT_SPECIAL_GROUPS                 = S_GRUPOS[]
         IT_SORT                        =
         IT_FILTER                      =
    -    Parâmetro p/executar sempre com a variante default
          I_DEFAULT                         = 'X'
    -                     Se é possível salvar as variantes
          I_SAVE                            = 'A'
    -                          Nome da variante selecionada
          IS_VARIANT                        = VARIANTE
         IT_EVENTS                      =
         IT_EVENT_EXIT                  =
          i_tabname_header                  = 'I_EKKO'
          i_tabname_item                    = 'I_EKPO'
         I_STRUCTURE_NAME_HEADER        =
         I_STRUCTURE_NAME_ITEM          =
          is_keyinfo                        = S_KEYINFO
          IS_PRINT                          = S_PRINT
         IS_REPREP_ID                   =
         I_BUFFER_ACTIVE                =
         I_BYPASSING_BUFFER             =
      IMPORTING
         E_EXIT_CAUSED_BY_CALLER        =
         ES_EXIT_CAUSED_BY_USER         =
        tables
          t_outtab_header                   = I_EKKO
          t_outtab_item                     = I_EKPO.
    endform.                    " zf_imprime_hierarquico_alv
    *&      Form  ZF_LIST
          text
    -->  p1        text
    <--  p2        text
    form ZF_LIST.
      PERFORM zf_layout.
      PERFORM zf_ordena_campos.
      PERFORM zf_monta_campos_alv.
      PERFORM zf_print.
      PERFORM zf_grupo.
      IF  NOT  I_EKPO[] IS INITIAL.
          PERFORM zf_imprime_list_alv.
      ELSE.
        MESSAGE s000(zcl001)  WITH  'Nenhum registro encontrado.'.
        STOP.
      ENDIF.
    endform.                    " ZF_LIST
    *&      Form  zf_imprime_list_alv
          text
    -->  p1        text
    <--  p2        text
    form zf_imprime_list_alv.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
          I_CALLBACK_PF_STATUS_SET       = 'ZF_SET_PF_STATUS_LIST'
          I_CALLBACK_USER_COMMAND        = 'ZF_USER_COMMAND'
        I_INTERFACE_CHECK              = ' '
        I_BYPASSING_BUFFER             =
        I_BUFFER_ACTIVE                = ' '
         I_CALLBACK_PROGRAM             = v_repid
         I_STRUCTURE_NAME               = 'I_EKPO'
         IS_LAYOUT                      = S_LAYOUT
         IT_FIELDCAT                    = T_FIELDCAT[]
        IT_EXCLUDING                   =
         IT_SPECIAL_GROUPS              = S_GRUPOS[]
         IT_SORT                        = T_SORT[]
        IT_FILTER                      =
        IS_SEL_HIDE                    =
         I_DEFAULT                      = 'X'
         I_SAVE                         = 'A'
         IS_VARIANT                     = VARIANTE
        IT_EVENTS                      =
        IT_EVENT_EXIT                  =
         IS_PRINT                       = S_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                       = I_EKPO.
    endform.                    " zf_imprime_list_alv
    *&      Form  zf_user_command
          text
    -->  p1        text
    <--  p2        text
    form zf_user_command using p_v_ucomm like SY-UCOMM
                               p_s_selfield type slis_selfield.
    *---tratamento de impressão do Sapscript----
    CASE p_v_ucomm.
      FLAG = 0.
         WHEN 'IMPRIMIR' OR 'PRINT'.
             LOOP AT i_ekpo.
                  IF NOT i_ekpo-BOX IS INITIAL.
                    FLAG = FLAG + 1.
                  ENDIF.
            ENDLOOP.
    se tiver selecionado apenas uma box
            IF flag EQ 1.
                IF p_gerar EQ 'X'.
    *-----perform para confirmação de download
                  PERFORM zf_popup_to_confirm.
                ENDIF.
    *------chama o form para imprimir o sapscript
                  PERFORM zf_sapscript.
            ENDIF.
    box estiver vazia
            IF flag EQ 0.
               MESSAGE E017(ZCL_GRUPO04). "Selecione apenas uma BOX
                                          "referente ao pedido de compras.
               STOP.
            ENDIF.
    "estiver selecionado + de uma box
            IF flag GT 1.
               MESSAGE E017(ZCL_GRUPO04). "Selecione apenas uma
                                         "BOX referente ao pedido de compra.
               STOP.
            ENDIF.
    ENDCASE.
    CASE p_s_selfield-sel_tab_field.
    *observe na exibição do relatório(hierarquico) que temos o EKKO-EBELN
    ficaria  melhor visualmente, a utilização de clicar no mesmo
         WHEN 'I_EKPO-EBELN'. "tab de saida
               SET PARAMETER ID 'BES' FIELD p_s_selfield-VALUE.
               CALL TRANSACTION 'ME23' AND SKIP FIRST SCREEN.
    ENDCASE.
    endform.                    " zf_user_command
    *&      Form  ZSET_PF_STATUS
          text
         -->P_EXTAB  text
    form ZSET_PF_STATUS using    p_extab.
      set pf-status 'BOTOES' EXCLUDING extab.
    endform.                    " ZSET_PF_STATUS
    *&      Form  zf_sapscript
          text
    -->  p1        text
    <--  p2        text
    form zf_sapscript.
    --carregar a ITCPO----
      PERFORM zf_itcpo.
    ----chamar a função Open_form
      PERFORM zf_open_form.
    *----buscar o fornecedor e seus dados
    LOOP AT I_ekko.
            v_element  =  'CABPRIN'.
            v_type     =  'BODY'.
            v_window   =  'JANCABEC'.
            PERFORM  zf_imprime_form USING  v_element
                                            v_type
                                            v_window.
    ENDLOOP.
    *----buscar o documento de compra selecionado
    LOOP AT i_ekpo.
        IF i_ekpo-BOX = 'X'.
            v_element  =  'MAIN'.
            v_type     =  'BODY'.
            v_window   =  'MAIN'.
            PERFORM  zf_imprime_form USING  v_element
                                            v_type
                                            v_window.
    *---o comando EXIT é para que somente quando 1 registro for selecionado
    no relatório e a verificação da igualdade acontecer faz que saia do
    Loop
        EXIT.
        ENDIF.
    ENDLOOP.
      PERFORM zf_close_form.
    endform.                    " zf_sapscript
    *&      Form  zf_itcpo
          text
    -->  p1        text
    <--  p2        text
    form zf_itcpo.
    *Parâmetros para impressão da tabela ITCPO
    ITCPO-TDCOPIES   = 1.           "Quantidade de cópias
    ITCPO-TDPAGESLCT = ''.          "Seleção de páginas
    ITCPO-TDPROGRAM  = SY-REPID.    "Captura o nome do programa
    ITCPO-TDIMMED    = c_on.        "Saída imediata do relatório
    ITCPO-TDPREVIEW  = c_on.        "Exibição prévia do relatório
    ITCPO-TDDEST     = 'LOCL'.      "SPOOL: dispositivo de saída
    ITCPO-TDFAXUSER  = SY-UNAME.    "Usuário logado naquele momento
    ITCPO-TDSENDDATE = SY-DATUM.    "Data de envio desejada
    ITCPO-TDSENDTIME = SY-UZEIT.    "Hora envio desejada
    ITCPO-TDNEWID    = c_on.        "Nova ordem SPOOL
    ITCPO-TDARMOD    = c_on.       "IMPRIMIR: modo de arquivamento
    ITCPO-TDTITLE    = 'Relatório de Compras por Classificação Contábil'.
    endform.                    " zf_itcpo
    *&      Form  zf_open_form

    Boa Tarde Carlos,
    Welcome to the SDN Forums. SDN gets it's power from the large community throughout the world. To harvest that power of knowledge we have settled on one language for posts here which is English.
    Clearly English is not your first language, but don't be afraid, I would vouch that for most of the participant here on SDN English is the second language.
    As it is for me. I am just lucky, that I am living in the States long enough that German colleagues start to look at me strangely when I talk to them in German, because it doesn't totally sound right anymore
    So we are very forgiving her in SDNland regarding grammar and spelling (although not as much anymore in the Weblogs), we even provide a spell checker.
    Please post your question again in English.
    If people don't understand you they will ask you about the things that they don't understand and you can then clarify.
    Try it out. Your chance of an excellent responds is way higher.
    Boa sorte, Mark.

  • I am not getting the headings of the fields in ALV output.

    I am not getting ALV out put but  the headings of the fields in ALV output.
    Please see my below code .
    TYPES : BEGIN OF ty_zgxmit.
              INCLUDE STRUCTURE zgxmit.
    TYPES : END OF ty_zgxmit.
    DATA : gt_zgxmit TYPE TABLE OF ty_zgxmit.
    *&      Form  alv_display                                              *
    This subroutine is to display the out put in ALV.                    *
    FORM alv_display .
    Local data
      DATA: y_x          LIKE boole  VALUE 'X'.
    DATA: lt_fieldcat  TYPE slis_t_fieldcat_alv.
      DATA: lf_fieldcat  TYPE slis_fieldcat_alv.
      DATA: lh_index     LIKE lf_fieldcat-col_pos.
    For variant
    DATA: ws_repid LIKE sy-repid,
          g_save TYPE c VALUE 'A',
          g_exit TYPE c,
          g_variant LIKE disvariant,
          gx_variant LIKE disvariant.
      For 1st field.( RPT_LOC )
        CLEAR lf_fieldcat.
        lf_fieldcat-fieldname = 'RPT_LOC'.
        lf_fieldcat-tabname = 'GT_ZGXMIT'.
        lf_fieldcat-ref_tabname = 'RPT_LOC'.
        lf_fieldcat-ref_fieldname = 'ZGXMIT'.
        lh_index = lh_index + 1.
        lf_fieldcat-col_pos = lh_index.
        lf_fieldcat-key = y_x.
        lf_fieldcat-no_sum = y_x.
        APPEND lf_fieldcat TO lt_fieldcat.
    For 2nd field.( BAL_XMIT )
        CLEAR lf_fieldcat.
        lf_fieldcat-fieldname = 'BAL_XMIT'.
        lf_fieldcat-tabname = 'GT_ZGXMIT'.
        lf_fieldcat-ref_tabname = 'BAL_XMIT'.
        lf_fieldcat-ref_fieldname = 'ZGXMIT'.
        lh_index = lh_index + 1.
        lf_fieldcat-col_pos = lh_index.
        lf_fieldcat-key = y_x.
        lf_fieldcat-no_sum = y_x.
        APPEND lf_fieldcat TO lt_fieldcat.
    For 3rd field.( INC_XMIT )
        CLEAR lf_fieldcat.
        lf_fieldcat-fieldname = 'INC_XMIT'.
        lf_fieldcat-tabname = 'GT_ZGXMIT'.
        lf_fieldcat-ref_tabname = 'INC_XMIT'.
        lf_fieldcat-ref_fieldname = 'ZGXMIT'.
        lh_index = lh_index + 1.
        lf_fieldcat-col_pos = lh_index.
        lf_fieldcat-key = y_x.
        lf_fieldcat-no_sum = y_x.
        APPEND lf_fieldcat TO lt_fieldcat.
    For 4th field.( Z500_XMIT )
        CLEAR lf_fieldcat.
        lf_fieldcat-fieldname = 'Z500_XMIT'.
        lf_fieldcat-tabname = 'GT_ZGXMIT'.
        lf_fieldcat-ref_tabname = 'Z500_XMIT'.
        lf_fieldcat-ref_fieldname = 'ZGXMIT'.
        lh_index = lh_index + 1.
        lf_fieldcat-col_pos = lh_index.
        lf_fieldcat-key = y_x.
        lf_fieldcat-no_sum = y_x.
        APPEND lf_fieldcat TO lt_fieldcat.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program       = 'ZJV_2245'
                it_fieldcat              = lt_fieldcat
           TABLES
                t_outtab                 = gt_zgxmit
           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.                    " alv_display

    You can force the headings like so.
    CLEAR lf_fieldcat.
    lf_fieldcat-fieldname = 'RPT_LOC'.
    lf_fieldcat-tabname = 'GT_ZGXMIT'.
    lf_fieldcat-ref_tabname = 'RPT_LOC'.
    lf_fieldcat-ref_fieldname = 'ZGXMIT'.
    lf_fieldcat-reptext_ddic  = 'Whatever Heading'.    "<-  Right here
    lh_index = lh_index + 1.
    lf_fieldcat-col_pos = lh_index.
    lf_fieldcat-key = y_x.
    lf_fieldcat-no_sum = y_x.
    APPEND lf_fieldcat TO lt_fieldcat.
    Regards,
    Rich Heilman

  • Field not present in the Field Catalog also getting displayed in the ALV

    Hi Experts,
    I am trying to display some to an ALV grid. But since i don't need all the fields from the internal table, i have deleted those fields from the field catalog. But in-spite of doing this the field heading is still getting displayed. I am not able to figure out the reason for this. Also note that the i have not deleted that field from my internal table which contains the actual data.
    Regards,
    Kush

    Hi,
    If your giving your internal table to the below field then ALV try to disply those many coloumn.
    wa_fcat-tabname    = 'IT_OUTPUT'.
    You can add for that field name.
    wa_fcat--NO_OUT = 'X'.
    Please check the field name on the output will be same as before column name .

  • IPC:bute in the field catalogue while processing configuration or pricing i

    Hi,
    I get this error (Message Class: PRC_MESSAGES_EXT (Messages for Calling Public Pricing Modules), Message Type: E, Message Number 099, Message variables: Message variables 1-4: IPC:bute in the field catalogue while processing configuration or pricing in context spe.condmgnt.customizing.dba.imp.AttributeClassObjectManager.createAttributeClassAttributeClassObjectManager.java)
    when we ran IPC userexits. 
    We've added a field ZZPSTYV in the communication structure and modified the method to define this field like follows:
         public String[] determineRelevantAttributesForRequirement(
              boolean headerAttributes,
              int reqNo) {                         String[] relevantAttributes = new String[0];
         //Header?
         if (headerAttributes) {          }
         //Item
         else {
         //KOMP fields
         switch (reqNo){
              case 900:                              relevantAttributes = new String[] {"ZZPSTYV" };                                   break;
        return relevantAttributes;
    Running this code we get the above listed error.  Same error if we define unnecessarily a standard field, such as SOLD_TO_PARTY in place of ZZPSTYV.  
    Can anyone give us some advise as what we did wrong?  Appreciate it very much,
    Yanhui

    Hi Yanhui,
    Is it a item field?  Remember that mixed fields should be declared at the header in the IPC.
    Missing any other requirements?
    Cheers
    Andrew

  • What is vendor performance report what are the fields using in the report

    What is vendor performance report what are the fields using in the report and i need some sample reports for that particular topic (clasical report)not using any alvs or any advance topics.
    U R Satish Patnaik

    hi
    good
    *"Table declarations...................................................
    TABLES:
    EKKO, " Purchasing Document Header
    CDHDR, " Change document header
    SSCRFIELDS. " Fields on selection screens
    *"Selection screen elements............................................
    SELECT-OPTIONS:
    S_EBELN FOR EKKO-EBELN, " Purchasing Document Number
    S_LIFNR FOR EKKO-LIFNR, " Vendor's account number
    S_EKGRP FOR EKKO-EKGRP, " Purchasing group
    S_BEDAT FOR EKKO-BEDAT, " Purchasing Document Date
    S_UDATE FOR CDHDR-UDATE. " Creation date of the change
    " document
    *" Data declarations...................................................
    Field String to hold Purchase Document Number *
    DATA:
    BEGIN OF FS_EBELN,
    EBELN(90) TYPE C, " Purchase Document Number
    ERNAM TYPE EKKO-ERNAM, " Name of Person who Created
    " the Object
    LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    EKGRP TYPE EKKO-EKGRP, " Purchasing group
    BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
    END OF FS_EBELN,
    Field String to hold Purchase Document Header *
    BEGIN OF FS_EKKO,
    EBELN TYPE EKKO-EBELN, " Purchasing Document Number
    ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
    " Object
    LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    EKGRP TYPE EKKO-EKGRP, " Purchasing group
    BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
    END OF FS_EKKO,
    Field String to hold Account Number and name of the Vendor *
    BEGIN OF FS_LFA1,
    LIFNR TYPE LFA1-LIFNR, " Account Number of Vendor
    NAME1 TYPE LFA1-NAME1, " Name1
    END OF FS_LFA1,
    Field String to hold Change date and the name of the user *
    BEGIN OF FS_CDHDR,
    OBJECTCLAS TYPE CDHDR-OBJECTCLAS, " Object Class
    OBJECTID TYPE CDHDR-OBJECTID, " Object value
    CHANGENR TYPE CDHDR-CHANGENR, " Document change number
    USERNAME TYPE CDHDR-USERNAME, " User name
    UDATE TYPE CDHDR-UDATE, " Creation date of the change
    " document
    END OF FS_CDHDR,
    Field String to hold Change document items *
    BEGIN OF FS_CDPOS,
    OBJECTCLAS TYPE CDPOS-OBJECTCLAS," Object class
    OBJECTID(10) TYPE C, " Object Value
    CHANGENR TYPE CDPOS-CHANGENR, " Document change number
    TABNAME TYPE CDPOS-TABNAME, " Table Name
    FNAME TYPE CDPOS-FNAME, " Field Name
    VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
    VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
    END OF FS_CDPOS,
    Field String to hold Date Element Name *
    BEGIN OF FS_DATAELE,
    TABNAME TYPE DD03L-TABNAME, " Table Name
    FIELDNAME TYPE DD03L-FIELDNAME, " Field Name
    ROLLNAME TYPE DD03L-ROLLNAME, " Data element (semantic domain)
    END OF FS_DATAELE,
    Field String to hold Short Text of the Date Element *
    BEGIN OF FS_TEXT,
    ROLLNAME TYPE DD04T-ROLLNAME, " Data element (semantic domain)
    DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
    " Repository Objects
    END OF FS_TEXT,
    Field String to hold data to be displayed on the ALV grid *
    BEGIN OF FS_OUTTAB,
    EBELN TYPE EKKO-EBELN, " Purchasing Document Number
    ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
    " Object
    LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    EKGRP TYPE EKKO-EKGRP, " Purchasing group
    BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
    WERKS TYPE LFA1-WERKS, " Plant
    NAME1 TYPE LFA1-NAME1, " Name1
    USERNAME TYPE CDHDR-USERNAME, " User name
    UDATE TYPE CDHDR-UDATE, " Creation date of the change
    " document
    DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
    " Repository Objects
    VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
    VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
    END OF FS_OUTTAB,
    Internal table to hold Purchase Document Number *
    T_EBELN LIKE STANDARD TABLE
    OF FS_EBELN,
    Internal table to hold Purchase Document Header *
    T_EKKO LIKE STANDARD TABLE
    OF FS_EKKO,
    Temp Internal table to hold Purchase Document Header *
    T_EKKO_TEMP LIKE STANDARD TABLE
    OF FS_EKKO,
    Internal table to hold Account number and Name of the Vendor *
    T_LFA1 LIKE STANDARD TABLE
    OF FS_LFA1,
    Internal Table to hold Change date and the name of the user *
    T_CDHDR LIKE STANDARD TABLE
    OF FS_CDHDR,
    Internal Table to hold Change document items *
    T_CDPOS LIKE STANDARD TABLE
    OF FS_CDPOS,
    Temp. Internal Table to hold Change document items *
    T_CDPOS_TEMP LIKE STANDARD TABLE
    OF FS_CDPOS,
    Internal Table to hold Data Element Name *
    T_DATAELE LIKE STANDARD TABLE
    OF FS_DATAELE,
    Temp. Internal Table to hold Data Element Name *
    T_DATAELE_TEMP LIKE STANDARD TABLE
    OF FS_DATAELE,
    Internal Table to hold Short Text of the Date Element *
    T_TEXT LIKE STANDARD TABLE
    OF FS_TEXT,
    Internal Table to hold data to be displayed on the ALV grid *
    T_OUTTAB LIKE STANDARD TABLE
    OF FS_OUTTAB.
    C L A S S D E F I N I T I O N *
    CLASS LCL_EVENT_HANDLER DEFINITION DEFERRED.
    *" Data declarations...................................................
    Work variables *
    DATA:
    W_EBELN TYPE EKKO-EBELN, " Purchasing Document Number
    W_LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    W_EKGRP TYPE EKKO-EKGRP, " Purchasing group
    W_VALUE TYPE EKKO-EBELN, " Reflected Value
    W_SPACE VALUE ' ', " Space
    W_FLAG TYPE I, " Flag Variable
    W_VARIANT TYPE DISVARIANT, " Variant
    *--- ALV Grid
    W_GRID TYPE REF TO CL_GUI_ALV_GRID,
    *--- Event Handler
    W_EVENT_CLICK TYPE REF TO LCL_EVENT_HANDLER,
    *--- Field catalog table
    T_FIELDCAT TYPE LVC_T_FCAT.
    AT SELECTION-SCREEN EVENT *
    AT SELECTION-SCREEN ON S_EBELN.
    Subroutine to validate Purchase Document Number.
    PERFORM VALIDATE_PD_NUM.
    AT SELECTION-SCREEN ON S_LIFNR.
    Subroutine to validate Vendor Number.
    PERFORM VALIDATE_VEN_NUM.
    AT SELECTION-SCREEN ON S_EKGRP.
    Subroutine to validate Purchase Group.
    PERFORM VALIDATE_PUR_GRP.
    START-OF-SELECTION EVENT *
    START-OF-SELECTION.
    Subroutine to select all Purchase orders.
    PERFORM SELECT_PO.
    CHECK W_FLAG EQ 0.
    Subroutine to select Object values.
    PERFORM SELECT_OBJ_ID.
    CHECK W_FLAG EQ 0.
    Subroutine to select Changed values.
    PERFORM SELECT_CHANGED_VALUE.
    CHECK W_FLAG EQ 0.
    Subroutine to Select Purchase Orders.
    PERFORM SELECT_PUR_DOC.
    Subroutine to select Vendor Details.
    PERFORM SELECT_VENDOR.
    Subroutine to select Text for the Changed values.
    PERFORM DESCRIPTION.
    END-OF-SELECTION EVENT *
    END-OF-SELECTION.
    IF NOT T_EKKO IS INITIAL.
    Subroutine to populate the Output Table.
    PERFORM FILL_OUTTAB.
    Subroutine to build Field Catalog.
    PERFORM PREPARE_FIELD_CATALOG CHANGING T_FIELDCAT.
    CALL SCREEN 100.
    ENDIF. " IF NOT T_EKKO...
    CLASS LCL_EVENT_HANDLER DEFINITION
    Defining Class which handles events
    CLASS LCL_EVENT_HANDLER DEFINITION .
    PUBLIC SECTION .
    METHODS:
    HANDLE_HOTSPOT_CLICK
    FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
    IMPORTING E_ROW_ID E_COLUMN_ID.
    ENDCLASS. " LCL_EVENT_HANDLER DEFINITION
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION
    Implementing the Class which can handle events
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION .
    *---Handle Double Click
    METHOD HANDLE_HOTSPOT_CLICK .
    Subroutine to get the HotSpot Cell information.
    PERFORM GET_CELL_INFO.
    SET PARAMETER ID 'BES' FIELD W_VALUE.
    CALL TRANSACTION 'ME23N'.
    ENDMETHOD. " HANDLE_HOTSPOT_CLICK
    ENDCLASS. " LCL_EVENT_HANDLER
    *& Module STATUS_0100 OUTPUT
    PBO Event
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'OOPS'.
    SET TITLEBAR 'TIT'.
    Subroutine to fill the Variant Structure
    PERFORM FILL_VARIANT.
    IF W_GRID IS INITIAL.
    CREATE OBJECT W_GRID
    EXPORTING
    I_SHELLSTYLE = 0
    I_LIFETIME =
    I_PARENT = CL_GUI_CONTAINER=>SCREEN0
    I_APPL_EVENTS =
    I_PARENTDBG =
    I_APPLOGPARENT =
    I_GRAPHICSPARENT =
    I_NAME =
    I_FCAT_COMPLETE = SPACE
    EXCEPTIONS
    ERROR_CNTL_CREATE = 1
    ERROR_CNTL_INIT = 2
    ERROR_CNTL_LINK = 3
    ERROR_DP_CREATE = 4
    OTHERS = 5.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF. " IF SY-SUBRC <> 0
    CALL METHOD W_GRID->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING
    I_BUFFER_ACTIVE =
    I_BYPASSING_BUFFER =
    I_CONSISTENCY_CHECK =
    I_STRUCTURE_NAME =
    IS_VARIANT = W_VARIANT
    I_SAVE = 'A'
    I_DEFAULT = 'X'
    IS_LAYOUT =
    IS_PRINT =
    IT_SPECIAL_GROUPS =
    IT_TOOLBAR_EXCLUDING =
    IT_HYPERLINK =
    IT_ALV_GRAPHICS =
    IT_EXCEPT_QINFO =
    IR_SALV_ADAPTER =
    CHANGING
    IT_OUTTAB = T_OUTTAB
    IT_FIELDCATALOG = T_FIELDCAT
    IT_SORT =
    IT_FILTER =
    EXCEPTIONS
    INVALID_PARAMETER_COMBINATION = 1
    PROGRAM_ERROR = 2
    TOO_MANY_LINES = 3
    OTHERS = 4
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF. " IF SY-SUBRC <> 0.
    ENDIF. " IF W_GRID IS INITIAL
    CREATE OBJECT W_EVENT_CLICK.
    SET HANDLER W_EVENT_CLICK->HANDLE_HOTSPOT_CLICK FOR W_GRID.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module USER_COMMAND_0100 INPUT
    PAI Event
    MODULE USER_COMMAND_0100 INPUT.
    CASE SY-UCOMM.
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    WHEN 'CANCEL'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Form PREPARE_FIELD_CATALOG
    Subroutine to build the Field catalog
    <--P_T_FIELDCAT Field Catalog Table
    FORM PREPARE_FIELD_CATALOG CHANGING PT_FIELDCAT TYPE LVC_T_FCAT .
    DATA LS_FCAT TYPE LVC_S_FCAT.
    Purchasing group...
    LS_FCAT-FIELDNAME = 'EKGRP'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Purchasing Document Number...
    LS_FCAT-FIELDNAME = 'EBELN'.
    LS_FCAT-REF_TABLE = 'EKKO' .
    LS_FCAT-EMPHASIZE = 'C411'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-HOTSPOT = 'X'.
    APPEND LS_FCAT TO PT_FIELDCAT .
    CLEAR LS_FCAT .
    Name of Person who Created the Object...
    LS_FCAT-FIELDNAME = 'ERNAM'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-OUTPUTLEN = '15' .
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Purchasing Document Date...
    LS_FCAT-FIELDNAME = 'BEDAT'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Vendor's account number...
    LS_FCAT-FIELDNAME = 'LIFNR'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Account Number of Vendor or Creditor...
    LS_FCAT-FIELDNAME = 'NAME1'.
    LS_FCAT-REF_TABLE = 'LFA1'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-COLTEXT = 'Vendor Name'(001).
    LS_FCAT-SELTEXT = 'Vendor Name'(001).
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Creation date of the change document...
    LS_FCAT-FIELDNAME = 'UDATE'.
    LS_FCAT-REF_TABLE = 'CDHDR'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-COLTEXT = 'Change Date'(002).
    LS_FCAT-SELTEXT = 'Change Date'(002).
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    User name of the person responsible in change document...
    LS_FCAT-FIELDNAME = 'USERNAME'.
    LS_FCAT-REF_TABLE = 'CDHDR'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-COLTEXT = 'Modified by'(003).
    LS_FCAT-SELTEXT = 'Modified by'(003).
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Short Text Describing R/3 Repository Objects...
    LS_FCAT-FIELDNAME = 'DDTEXT'.
    LS_FCAT-REF_TABLE = 'DD04T'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '15'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Old contents of changed field...
    LS_FCAT-FIELDNAME = 'VALUE_OLD'.
    LS_FCAT-REF_TABLE = 'CDPOS'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '12'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    New contents of changed field...
    LS_FCAT-FIELDNAME = 'VALUE_NEW'.
    LS_FCAT-REF_TABLE = 'CDPOS'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '12'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    ENDFORM. " PREPARE_FIELD_CATALOG
    *& Form SELECT_PO
    Subroutine to select all the Purchase Orders
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_PO .
    SELECT EBELN " Purchasing Document Number
    ERNAM " Name of Person who Created
    " the Object
    LIFNR " Vendor's account number
    EKGRP " Purchasing group
    BEDAT " Purchasing Document Date
    FROM EKKO
    PACKAGE SIZE 10000
    APPENDING TABLE T_EBELN
    WHERE EBELN IN S_EBELN
    AND BEDAT IN S_BEDAT.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    W_FLAG = 1.
    MESSAGE S401(M8).
    ENDIF. " IF SY-SUBRC NE 0
    ENDFORM. " SELECT_PO
    *& Form SELECT_OBJ_ID
    Subroutine to select Object ID
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_OBJ_ID .
    IF NOT T_EBELN IS INITIAL.
    SELECT OBJECTCLAS " Object Class
    OBJECTID " Object value
    CHANGENR " Document change number
    USERNAME " User name
    UDATE " Creation date
    FROM CDHDR
    INTO TABLE T_CDHDR
    FOR ALL ENTRIES IN T_EBELN
    WHERE OBJECTID EQ T_EBELN-EBELN
    AND UDATE IN S_UDATE
    AND TCODE IN ('ME21N','ME22N','ME23N').
    ENDSELECT.
    IF SY-SUBRC NE 0.
    W_FLAG = 1.
    MESSAGE S833(M8) WITH 'Header Not Found'(031).
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_EBELN IS INITIAL
    ENDFORM. " SELECT_OBJ_ID
    *& Form SELECT_CHANGED_VALUE
    Subroutine to select Changed Values
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_CHANGED_VALUE .
    IF NOT T_CDHDR IS INITIAL.
    SELECT OBJECTCLAS " Object class
    OBJECTID " Object value
    CHANGENR " Document change number
    TABNAME " Table Name
    FNAME " Field Name
    VALUE_NEW " New contents of changed field
    VALUE_OLD " Old contents of changed field
    FROM CDPOS
    PACKAGE SIZE 10000
    APPENDING TABLE T_CDPOS
    FOR ALL ENTRIES IN T_CDHDR
    WHERE OBJECTCLAS EQ T_CDHDR-OBJECTCLAS
    AND OBJECTID EQ T_CDHDR-OBJECTID
    AND CHANGENR EQ T_CDHDR-CHANGENR.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    W_FLAG = 1.
    MESSAGE S833(M8) WITH 'Item Not Found'(032).
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_CDHDR IS INITIAL
    T_CDPOS_TEMP[] = T_CDPOS[].
    ENDFORM. " SELECT_CHANGED_VALUE
    *& Form SELECT_PUR_DOC
    Subroutine to select Purchase Order Details
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_PUR_DOC .
    IF NOT T_CDPOS IS INITIAL.
    SORT T_EBELN BY EBELN.
    LOOP AT T_CDPOS INTO FS_CDPOS.
    READ TABLE T_EBELN INTO FS_EBELN WITH KEY EBELN =
    FS_CDPOS-OBJECTID BINARY SEARCH.
    IF SY-SUBRC NE 0.
    DELETE TABLE T_EBELN FROM FS_EBELN.
    ENDIF. " IF SY-SUBRC NE 0.
    ENDLOOP. " LOOP AT T_CDPOS...
    LOOP AT T_EBELN INTO FS_EBELN.
    MOVE FS_EBELN-EBELN TO FS_EKKO-EBELN.
    MOVE FS_EBELN-ERNAM TO FS_EKKO-ERNAM.
    MOVE FS_EBELN-LIFNR TO FS_EKKO-LIFNR.
    MOVE FS_EBELN-EKGRP TO FS_EKKO-EKGRP.
    MOVE FS_EBELN-BEDAT TO FS_EKKO-BEDAT.
    APPEND FS_EKKO TO T_EKKO.
    ENDLOOP. " LOOP AT T_EBELN...
    T_EKKO_TEMP[] = T_EKKO[].
    ENDIF. " IF NOT T_CDPOS IS INITIAL
    ENDFORM. " SELECT_PUR_DOC
    *& Form SELECT_VENDOR
    Subroutine to select Vendor details
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_VENDOR .
    IF NOT T_EKKO IS INITIAL.
    SORT T_EKKO_TEMP BY LIFNR.
    DELETE ADJACENT DUPLICATES FROM T_EKKO_TEMP COMPARING LIFNR.
    SELECT LIFNR " Account Number of Vendor or
    " Creditor
    NAME1 " Name 1
    FROM LFA1
    INTO TABLE T_LFA1
    FOR ALL ENTRIES IN T_EKKO_TEMP
    WHERE LIFNR EQ T_EKKO_TEMP-LIFNR.
    IF SY-SUBRC NE 0.
    MESSAGE S002(M8) WITH 'Master Details'(033).
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_EKKO IS INITIAL
    ENDFORM. " SELECT_VENDOR
    *& Form DESCRIPTION
    Subroutine to get the description
    There are no interface parameters to be passed to this subroutine.
    FORM DESCRIPTION .
    IF NOT T_CDPOS IS INITIAL.
    SORT T_CDPOS_TEMP BY TABNAME FNAME.
    DELETE ADJACENT DUPLICATES FROM T_CDPOS_TEMP COMPARING TABNAME FNAME
    SELECT TABNAME " Table Name
    FIELDNAME " Field Name
    ROLLNAME " Data element
    FROM DD03L
    INTO TABLE T_DATAELE
    FOR ALL ENTRIES IN T_CDPOS_TEMP
    WHERE TABNAME EQ T_CDPOS_TEMP-TABNAME
    AND FIELDNAME EQ T_CDPOS_TEMP-FNAME.
    IF NOT T_DATAELE IS INITIAL.
    T_DATAELE_TEMP[] = T_DATAELE[].
    SORT T_DATAELE_TEMP BY ROLLNAME.
    DELETE ADJACENT DUPLICATES FROM T_DATAELE_TEMP COMPARING ROLLNAME.
    SELECT ROLLNAME " Data element
    DDTEXT " Short Text Describing R/3
    " Repository Objects
    FROM DD04T
    INTO TABLE T_TEXT
    FOR ALL ENTRIES IN T_DATAELE_TEMP
    WHERE ROLLNAME EQ T_DATAELE_TEMP-ROLLNAME
    AND DDLANGUAGE EQ SY-LANGU.
    IF SY-SUBRC NE 0.
    EXIT.
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_DATAELE IS INITIAL.
    ENDIF. " IF NOT T_CDPOS IS INITIAL.
    ENDFORM. " DESCRIPTION
    *& Form FILL_OUTTAB
    Subroutine to populate the Outtab
    There are no interface parameters to be passed to this subroutine.
    FORM FILL_OUTTAB .
    SORT T_CDHDR BY OBJECTCLAS OBJECTID CHANGENR.
    SORT T_EKKO BY EBELN.
    SORT T_LFA1 BY LIFNR.
    SORT T_DATAELE BY TABNAME FIELDNAME.
    SORT T_TEXT BY ROLLNAME.
    LOOP AT T_CDPOS INTO FS_CDPOS.
    READ TABLE T_CDHDR INTO FS_CDHDR WITH KEY
    OBJECTCLAS = FS_CDPOS-OBJECTCLAS
    OBJECTID = FS_CDPOS-OBJECTID
    CHANGENR = FS_CDPOS-CHANGENR
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_CDHDR-USERNAME TO FS_OUTTAB-USERNAME.
    MOVE FS_CDHDR-UDATE TO FS_OUTTAB-UDATE.
    READ TABLE T_EKKO INTO FS_EKKO WITH KEY
    EBELN = FS_CDHDR-OBJECTID
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_EKKO-EBELN TO FS_OUTTAB-EBELN.
    MOVE FS_EKKO-ERNAM TO FS_OUTTAB-ERNAM.
    MOVE FS_EKKO-LIFNR TO FS_OUTTAB-LIFNR.
    MOVE FS_EKKO-EKGRP TO FS_OUTTAB-EKGRP.
    MOVE FS_EKKO-BEDAT TO FS_OUTTAB-BEDAT.
    READ TABLE T_LFA1 INTO FS_LFA1 WITH KEY
    LIFNR = FS_EKKO-LIFNR
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_LFA1-NAME1 TO FS_OUTTAB-NAME1.
    ENDIF. " IF SY-SUBRC EQ 0.
    ENDIF. " IF SY-SUBRC EQ 0.
    ENDIF. " IF SY-SUBRC EQ 0.
    MOVE FS_CDPOS-VALUE_NEW TO FS_OUTTAB-VALUE_NEW.
    MOVE FS_CDPOS-VALUE_OLD TO FS_OUTTAB-VALUE_OLD.
    READ TABLE T_DATAELE INTO FS_DATAELE WITH KEY
    TABNAME = FS_CDPOS-TABNAME
    FIELDNAME = FS_CDPOS-FNAME
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    READ TABLE T_TEXT INTO FS_TEXT WITH KEY
    ROLLNAME = FS_DATAELE-ROLLNAME
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_TEXT-DDTEXT TO FS_OUTTAB-DDTEXT.
    ENDIF. " IF SY-SUBRC EQ 0.
    ENDIF. " IF SY-SUBRC EQ 0.
    APPEND FS_OUTTAB TO T_OUTTAB.
    CLEAR FS_OUTTAB.
    ENDLOOP.
    ENDFORM. " FILL_OUTTAB
    *& Form GET_CELL_INFO
    Subroutine to get the Cell Information
    --> W_VALUE Holds the value of Hotspot clicked
    FORM GET_CELL_INFO .
    CALL METHOD W_GRID->GET_CURRENT_CELL
    IMPORTING
    E_ROW =
    E_VALUE = W_VALUE
    E_COL =
    ES_ROW_ID =
    ES_COL_ID =
    ES_ROW_NO =
    ENDFORM. " GET_CELL_INFO
    *& Form VALIDATE_PD_NUM
    Subroutine to validate Purchase Document Number
    There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_PD_NUM .
    IF NOT S_EBELN[] IS INITIAL.
    SELECT EBELN " Purchase Document Number
    FROM EKKO
    INTO W_EBELN
    UP TO 1 ROWS
    WHERE EBELN IN S_EBELN.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    CLEAR SSCRFIELDS-UCOMM.
    MESSAGE E717(M8).
    ENDIF. " IF SY-SUBRC NE 0
    ENDIF. " IF NOT S_EBELN[]...
    ENDFORM. " VALIDATE_PD_NUM
    *& Form VALIDATE_VEN_NUM
    Subroutine to validate Vendor Number
    There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_VEN_NUM .
    IF NOT S_LIFNR[] IS INITIAL.
    SELECT LIFNR " Vendor Number
    FROM LFA1
    INTO W_LIFNR
    UP TO 1 ROWS
    WHERE LIFNR IN S_LIFNR.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    CLEAR SSCRFIELDS-UCOMM.
    MESSAGE E002(M8) WITH W_SPACE.
    ENDIF. " IF SY-SUBRC NE 0
    ENDIF. " IF NOT S_LIFNR[]...
    ENDFORM. " VALIDATE_VEN_NUM
    *& Form VALIDATE_PUR_GRP
    Subroutine to validate the Purchase Group
    There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_PUR_GRP .
    IF NOT S_EKGRP[] IS INITIAL.
    SELECT EKGRP " Purchase Group
    FROM T024
    INTO W_EKGRP
    UP TO 1 ROWS
    WHERE EKGRP IN S_EKGRP.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    CLEAR SSCRFIELDS-UCOMM.
    MESSAGE E622(M8) WITH W_SPACE.
    ENDIF. " IF SY-SUBRC NE 0
    ENDIF. " IF NOT S_EKFRP[]...
    ENDFORM. " VALIDATE_PUR_GRP
    *& Form FILL_VARIANT
    Subroutine to fill the Variant Structure
    There are no interface parameters to be passed to this subroutine
    FORM FILL_VARIANT .
    Filling the Variant structure
    W_VARIANT-REPORT = SY-REPID.
    W_VARIANT-USERNAME = SY-UNAME.
    ENDFORM. " FILL_VARIANT
    reward point if helpful.
    thanks
    mrutyun^

Maybe you are looking for

  • Scheduling of Process Orders

    Hi, I have maintained all the formulas in resources and also maintained scheduling parameters in order types but still system is not scheduling the process orders. Can any one guide me where exactly the problem is? Thanks and regards, Pavan

  • Problem Pending po qty  condition

    Hi all, I have a problem in pending po condition. In our scenario,We usually take the pending po from EKET table. pending poqty = (EKET-MENGE) - (EKET-WEMNG). In my case,we are using 103 ( GR into blocked stock) mvt type to raise GR against the po an

  • CAD not saving

    Hello all, in CAD we have optoin to assign one role to multiple approver, i have added few approver for one role but when trying to save this give me error that "error saving custom approver determinator" Does anyone know why i am getting this error

  • In a unique website I must manually refresh( once +) to change pages

    When in www.uswatersystems.com and attempting to change pages (ie. by clicking on a category or type of part button) a "transferring data...) notice appears at Lower Left screen but the page remains blank. Clicking the refresh (now X) button (changed

  • Font.properties to set custom in-house fonts

    Hi all, Currently attempting to get Forms Server to display a custom fonts called TH Sans Serif which is MS Sans Serif modified for our special needs. We need to show a whole array of fonts which caters for Rumanian, Hungarian, Polish, Slovak, Wester