How to Refresh "Internal table values" in User EXIT.

Dear All,
My requirement is to place some checks in exit ZXQQMU20 in different tabs from the TCODE IW21 . IW22 etc.
Now after placeing the checks towards the different tabs while doing "NOCO" from IW21 the conditions are fullfilled but
when i go ahead to modify the created  "NOCO " from the TCODE IW22 by deleting the created values and saving in IW22 , the conditions written in the exit are still satisfied eventhough i have deleted the values in IW22.
The reason for this is that the tables which are there in the exit ZXQQMU20 T_VIQMFE , T_VIQMUR , T_VIQMMA
still contains the old values which were there at the time of creation of "NOCO"  in IW21 .
How to refresh my " internal tables values" used in such that even at the time of modification of the NOCO through IW22 my table values should pick the current screen values and not the values which were there at the time of creation.
Please help.
The code i have written in the exit is as below:-
********************* Changed vide ******START
*****IW21  IW22 also added in filter criteria of notification *************
******The purpose of this modification is that in the execution of IW21 or IW22 or IW24 or IW25 we have to give a check that if the
******notification type is M2 than inside the Transaction screen , if the Breakdown duration comes less than 15 min than there are
******no issues but if the breakdown duration is more than 15 min than the mandatory fields needs to be entered in the analysis tab.
**    The user has to fill up either following mandatory fields in Analysis Data tab.
**    A. Object Parts & Damages sub tab
**    Code Group - Object Parts (OTGRP, VIQMFE)
**                          AND
**    Code Group - Problem / Damage (FEGRP, VIQMFE)
**    Or
**    Notification Item Short Text (FETXT, VIQMFE)
**   B. Cause sub tab
**    Code Group # Causes (URGRP, VIQMUR)
**    Or
**    Cause Text (URTXT, VIQMUR)
**   C. Action Taken sub tab
**    Code Group # Activities (MNGRP, VIQMMA)
**    Or
**    Activity Text (MATXT, VIQMMA)
**            Then, allow user to complete notification (NOCO).
CLEAR : L_VAR , L_COMP_TIME.
IF ( SY-TCODE EQ 'IW21' OR SY-TCODE EQ 'IW22' OR SY-TCODE EQ 'IW24' OR
      SY-TCODE EQ 'IW25' ).
   IF ( E_VIQMEL-IWERK = '061' ) OR ( E_VIQMEL-IWERK = '062' ).
     IF E_VIQMEL-QMART = 'M2'.
       L_VAR = E_VIQMEL-AUSZT.
       L_COMP_TIME = L_VAR / 60.
       IF L_COMP_TIME < 15.
         EXIT.
       ELSEIF L_COMP_TIME > 15..
*         IF ( T_VIQMFE-OTGRP IS INITIAL AND T_VIQMFE-FEGRP IS INITIAL )  OR  ( T_VIQMFE-FETXT IS INITIAL ) .
*           MESSAGE 'Please fill the mandatory analysis data in Object Parts' TYPE 'E'.
*         ENDIF.
         IF T_VIQMFE-OTGRP EQ '' OR T_VIQMFE-FEGRP EQ ''.
           IF T_VIQMFE-FETXT EQ ''.
             MESSAGE 'Please fill the mandatory analysis data in Object Parts' TYPE 'E'.
           ENDIF.
         ENDIF.
         CLEAR L_TAG.
         IF T_VIQMUR[] IS INITIAL.
           MESSAGE 'Please fill the mandatory analysis data in Cause tab' TYPE 'E'.
         ELSE.
           LOOP AT T_VIQMUR.
             IF  T_VIQMUR-URGRP IS INITIAL .
               IF T_VIQMUR-URTXT IS INITIAL.
                 L_TAG = 'X'.
               ENDIF.
             ENDIF.
           ENDLOOP.
           IF L_TAG = 'X'.
             MESSAGE 'Please fill the mandatory analysis data in Cause tab' TYPE 'E'.
           ENDIF.
         ENDIF.
         CLEAR L_TAG.
         IF T_VIQMMA[] IS INITIAL.
           MESSAGE 'Please fill the mandatory analysis data in Action' TYPE 'E'.
         ELSE.
           LOOP AT T_VIQMMA.
             IF  T_VIQMMA-MNGRP IS INITIAL .
               IF T_VIQMMA-MATXT IS INITIAL.
                 L_TAG = 'X'.
               ENDIF.
             ENDIF.
           ENDLOOP.
           IF L_TAG = 'X'.
             MESSAGE 'Please fill the mandatory analysis data in Action' TYPE 'E'.
           ENDIF.
         ENDIF.
       ENDIF.
     ENDIF.
   ENDIF.
ENDIF.
<Added code tags>
Thank you so much in advance..
-Sudhish
Please use the code tags when you're posting any code snippet
Edited by: Suhas Saha on Jul 13, 2011 12:39 PM

Hi, I was thinking just like XVBAP and YVBAP values in the USEREXIT_SAVE_DOCUMENT.
Plz check u have x /y versions or tables like _old/ _new suffixes and then move the value accordingly.
otherwise there may be inconsistency.
Edited by: Prasenjit S. Bist on Jul 13, 2011 3:03 PM

Similar Messages

  • How to pass  internal table values to parameter

    hi,
             how to pass  internal table values to parameter in selection screen.if is it possible means please sent codeings.
    thanks.
      stalin.

    hi,
    tables : mara.
    data :  begin of itab_mara occurs 0,
              matnr like mara-matnr,
              ernam like mara-ernam,
              end of itab_mara.
    selection-screen : begin of block blk1 with frame title text-001.
    parameters : p_matnr like mara-matnr.
    selection-screen : end of block blk1.
    select matnr ernam from mara into corresponding fields of itab_mara
                                                                    where matnr = p_matnr.
    loop at itab_mara.
    write :/ itab_mara-matnr,
               itab_mara-ernam.
    endloop.
    <b><REMOVED BY MODERATOR></b>
    Message was edited by:
            Alvaro Tejada Galindo

  • Making parmanent changes to a internal table inside a user exit

    Hi All,
    I am having a User exit to which I am passing a structure as importing parameter.
    The user exit is not exporting the same structure, but is exporting some other values.
    My problem is that I want to make parmanent changes in the structure I am passing to the user exit.
    Currently what is happening:
    I am passing the structure to the user exit. It has got 6 rows. Inside the user exit I am making some changes to a particular field of all the rows. Till the program control is inside the user exit the changes in the structure are visible. As soon as the control come out of the user exit, the values for the field are switched to teh old values(values before passing to teh user exit).
    My question is, is there any method to make changes to a internal table inside a user exit and these changes are visible outside it when the program control come out of the user exit. (This is when the internal table to which the change is made in not exported by the user exit)

    Hi Dear,
    Your changes done in import parameters will not reflect outside exit. You can only change the values of export parameters...
    If you have very urgent requirement then make changes in SAP''s Standard code.
    For your problem you can write to SAP. In many cases SAP provides the solution.
    Award Points If Useful.

  • How to bind internal table values with RootUIElement(Table) from select Que

    Hello Friends,
           In my view Layout,there r two Input fields ,Submit button and Table... My concept is when user posting values in two input fields and clicking submit button means the result(more than one values) should be displayed in Table...
         I written coding also but i dont know to bind internal table values with Table... My code as follows,
    method onactionsearch .
       data:
         Node_Node_Flight                    type ref to If_Wd_Context_Node,
         Elem_Node_Flight                    type ref to If_Wd_Context_Element,
         Stru_Node_Flight                    type If_View1=>Element_Node_Flight ,
         itab TYPE STANDARD TABLE OF sflight.
    navigate from <CONTEXT> to <NODE_FLIGHT> via lead selection
       Node_Node_Flight = wd_Context->get_Child_Node( Name = IF_VIEW1=>wdctx_Node_Flight ).
    @TODO handle not set lead selection
       if ( Node_Node_Flight is initial ).
       endif.
    get element via lead selection
       Elem_Node_Flight = Node_Node_Flight->get_Element(  ).
    @TODO handle not set lead selection
       if ( Elem_Node_Flight is initial ).
       endif.
    alternative access  via index
    Elem_Node_Flight = Node_Node_Flight->get_Element( Index = 1 ).
    @TODO handle non existant child
    if ( Elem_Node_Flight is initial ).
    endif.
    get all declared attributes
       Elem_Node_Flight->get_Static_Attributes(
         importing
           Static_Attributes = Stru_Node_Flight ).
    select * from sflight into CORRESPONDING FIELDS OF TABLE itab
      WHERE carrid = Stru_Node_Flight-carrid and connid = Stru_Node_Flight-connid.
    Node_Node_Flight->bind_table( new_items = itab ).
    endmethod.
    Plz reply me asap...!

    Hi,
    What I understood from your coding is...
    * navigate from <CONTEXT> to <NODE_FLIGHT> via lead selection
    Node_Node_Flight = wd_Context->get_Child_Node( Name = IF_VIEW1=>wdctx_Node_Flight ).
    You are reading values from the above node and binding the values to the same node.Am i right?
    Did you take seperate context node for your input fields or binded the above context to the fields.If not then read the context attribute values which are binded to the carrid and connid then pass these values to select query.
    One more thing is select cardinality 1..n for node NODE_FLIGHT since you are displaying more than one record.
    Go through the some basic tutorials.Search in sdn you will it get.Already there is a tutorial in sdn which explains exactly what do you require.
    Go throgh this link
    Web Dynpro for ABAP: Tutorials for Beginners
    Web Dynpro for ABAP: Tutorials for Beginners [original link is broken]
    Edited by: suman kumar chinnam on Mar 26, 2009 10:50 AM

  • How to paas internal table value

    how to pass internal table first value to a variable plz help me

    Hi dulla anjan prasad 
       You can use the LOOP statement to process special loops for any internal table.
    LOOP AT itab result condition.
      statement block
    ENDLOOP.
    This reads the lines of the table one by one as specified in the result part of the LOOP statement. You can then process them in the statements within the LOOP - ENDLOOP control structure. You can either run the loop for all entries in the internal table, or restrict the number of lines read by specifying a condition. Control level processing is allowed within the loop.
    The sequence in which the lines are processed depends on the table type:
    ·        Standard tables and sorted tables
    The lines are processed according to the linear index. Within the processing block, the system field sy-tabix contains the index of the current line.
    ·        Hashed tables
    As long as the table has not been sorted, the lines are processed in the order in which you added them to the table. Within the processing block, the system field sy-tabix is always 0.
    You can nest LOOP blocks. When you leave the loop, sy-tabix has the same value as when you entered it. After the ENDLOOP statement, sy-subrc is zero if at least one table entry was processed. Otherwise, it is 4.
    The loop may not contain any operations on entire internal tables  that change the table. However, you should remember that even saving a global internal table with the LOCAL statement in a procedure is a change operation on the entire table, since it exchanges the table contents. When you call procedures within loops, you should therefore check that it does not change the entire internal table. If you change the table, the loop can no longer work properly.
    If you insert or delete a table entry within a loop pass, it is taken into account in subsequent loop passes as follows:
    ·        If you insert a line after the current line, it will be processed in a subsequent loop pass.
    ·        If you delete a line after the current line, it will not be processed in a subsequent loop pass.
    ·        If you insert a line before or at the current line, the internal loop counter will be increased accordingly.
    ·        If you delete a line before or at the current line, the internal loop counter will be decreased accordingly.
    If this information is usefull plz do reward points....
    Message was edited by:
            ARUN

  • How to convert Internal table values to excel file

    Hi Experts!!!
    I have requirement to generate a Excel(.xls) file for a requirement. For this the final internal table values has to be moved to excel file. I have used function module "SAP_CONVERT_TO_XLS_FORMAT" to generate it to my local machine. But when i tried to generate the file in "AL11" folder its giving a dump. Ex(/sapia/iface/out/comm/saphr/test.xls). Can anyone please tell me is there anyother function modules or program to generate in sapia folder. 
    Thanks.
    Ganesh R K

    try to save as a tab delimited.

  • How to store internal table value in single variable

    hi gurus,
    i have 3 value in int table , so want to store the value of int table into single variable of type string.
    how it is possible

    hmmm, your requirement is kinda weird and you could have given us a bit more info, but well lets start.
    Why is your requirement weird?
    Well an internal table kinda is a variable itself, or rather a set of variables which together make up for a line type of your table.
    So you have a value you already have in a variable and now want to store it in anotherone? Seems weird.
    What type is your internal table?
    Do you have those three values in one record or in  three records which only hold one value each?
    Which of your values do you want to store in another variable?
    Anyway, make a F1 on the "READ TABLE" statement, this should definiteley help you.
    The "LOOP AT WHERE" statement could as well help if there should occur probrlem using READ TABLE.
    /edit DAMn i was posting this while you gave us more info.
    So still the question stays if you got your three values in one record or in three records.
    DATA: lv_variabl_containing_all      type char100.
    loop at itab into wa.
      concatenate lv_variabl_containing_all wa-value into lv_variabl_containing_all seperated by space.
    endloop.
    after the loop you now got all your values in lv_variabl_containing_all.
    That is for the case you got three records.
    other case would be
    Read table itab into wa index 1.
    concatenate wa-value1 wa-value2 wa-value3 into lv_variabl_containing_all.
    Edited by: Florian Kemmer on Apr 16, 2010 12:59 PM

  • How to Send Internal table to SAP Spool using Function Modules or Methods?

    Hi Experts,
    How to Send Internal table to SAP Spool using Function Modules or Methods?
    Thanks ,
    Kiran

    This is my code.
    I still get the no ABAP list data for the spool, even tho I can see it sp01?
    REPORT  Z_MAIL_PAYSLIP.
    * Declaration Part *
    tables: PERNR, PV000, T549Q, V_T514D, HRPY_RGDIR.
    infotypes: 0000, 0001, 0105, 0655.
    data: begin of ITAB occurs 0,
      MTEXT(25) type C,
      PERNR like PA0001-PERNR,
      ABKRS like PA0001-ABKRS,
      ENAME like PA0001-ENAME,
      USRID_LONG like PA0105-USRID_LONG,
    end of ITAB.
    data: W_BEGDA like HRPY_RGDIR-FPBEG,
          W_ENDDA like HRPY_RGDIR-FPEND.
    data: RETURN like BAPIRETURN1 occurs 0 with header line.
    data: P_INFO like PC407,
          P_FORM like PC408 occurs 0 with header line.
    data: P_IDX type I,
          MY_MONTH type T549Q-PABRP,
          STR_MY_MONTH(2) type C,
          MY_YEAR type T549Q-PABRJ,
          STR_MY_YEAR(4) type C,
          CRLF(2) type x value '0D0A'.
    data: W_CMONTH(10) type C.
    data: TAB_LINES type I,
          ATT_TYPE like SOODK-OBJTP.
    data: begin of P_INDEX occurs 0,
            INDEX type I,
    end of P_INDEX.
    constants: begin of F__LTYPE, "type of line
       CMD like PC408-LTYPE value '/:',  "command
       TXT like PC408-LTYPE value 's',   "textline
    end of F__LTYPE.
    constants: begin of F__CMD, "commands
      NEWPAGE like PC408-LINDA value '',
    end of F__CMD.
    data: P_LIST like ABAPLIST occurs 1 with header line.
    *data: OBJBIN like SOLISTI1 occurs 10 with header line,
    data: OBJBIN like  LVC_S_1022 occurs 10 with header line,
          DOCDATA like SODOCCHGI1,
          OBJTXT like SOLISTI1 occurs 10 with header line,
          OBJPACK like SOPCKLSTI1 occurs 1 with header line,
          RECLIST like SOMLRECI1 occurs 1 with header line,
          OBJHEAD like SOLISTI1 occurs 1 with header line,
          it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          gd_buffer type string,
          l_no_of_bytes TYPE i,
          l_pdf_spoolid LIKE tsp01-rqident,
          l_jobname     LIKE tbtcjob-jobname.
    data: file_length  type int4,
          spool_id     type rspoid,
          line_cnt     type i.
    *-------------------------------------------------------------------* * INITIALIZATION *
    OBJBIN = ' | '.
    append OBJBIN.
    OBJPACK-HEAD_START = 1.
    data: S_ABKRS like PV000-ABKRS.
    data: S_PABRP like T549Q-PABRP.
    data: S_PABRJ like T549Q-PABRJ.
    * SELECTION SCREEN                                                  *
    selection-screen begin of block BL1.
    parameters: PAY_VAR like BAPI7004-PAYSLIP_VARIANT default 'ESS_PAYSLIPS' obligatory.
    selection-screen end of block BL1.
    START-OF-SELECTION.
      s_ABKRS = PNPXABKR.
      S_PABRP = PNPPABRP.
      s_pabrj = PNPPABRJ.
      w_begda = PN-BEGDA.
      w_endda = PN-ENDDA.
    get pernr.
    *                                 "Check active employees
      rp-provide-from-last p0000 space pn-begda  pn-endda.
      CHECK P0000-STAT2 IN PNPSTAT2.
    *                                 "Check Payslip Mail flag
      rp-provide-from-last p0655 space pn-begda  pn-endda.
      CHECK P0655-ESSONLY = 'X'.
      rp-provide-from-last p0001 space pn-begda  pn-endda.
    *                                 "Find email address
      RP-PROVIDE-FROM-LAST P0105 '0030' PN-BEGDA PN-ENDDA.
      if p0105-usrid_LONG ne ''.
        ITAB-PERNR      = P0001-PERNR.
        ITAB-ABKRS      = P0001-ABKRS.
        ITAB-ENAME      = P0001-ENAME.
        ITAB-USRID_LONG = P0105-USRID_LONG.
        append itab.
        clear itab.
      endif.
      "SY-UCOMM ='ONLI'
    END-OF-SELECTION.
    *------------------------------------------------------------------* start-of-selection.
      write : / 'Payroll Area        : ', S_ABKRS.
      write : / 'Payroll Period/Year : ',STR_MY_MONTH,'-',STR_MY_YEAR. write : / 'System Date : ', SY-DATUM.
      write : / 'System Time         : ', SY-UZEIT.
      write : / 'User Name           : ', SY-UNAME.
      write : / SY-ULINE.
      sort ITAB by PERNR.
      loop at ITAB.
        clear : P_INFO, P_FORM, P_INDEX, P_LIST, OBJBIN, DOCDATA, OBJTXT, OBJPACK, RECLIST, TAB_LINES.
        refresh : P_FORM, P_INDEX, P_LIST, OBJBIN, OBJTXT, OBJPACK, RECLIST.
    *                                                  Retrieve Payroll results sequence number for this run
        select single * from HRPY_RGDIR where PERNR eq ITAB-PERNR
                                        and FPBEG ge W_BEGDA
                                        and FPEND le W_ENDDA
                                        and SRTZA eq 'A'.
    *                                                  Produce payslip for those payroll results
        if SY-SUBRC = 0.
          call function 'GET_PAYSLIP'
            EXPORTING
              EMPLOYEE_NUMBER = ITAB-PERNR
              SEQUENCE_NUMBER = HRPY_RGDIR-SEQNR
              PAYSLIP_VARIANT = PAY_VAR
            IMPORTING
              RETURN          = RETURN
              P_INFO          = P_INFO
            TABLES
              P_FORM          = P_FORM.
          check RETURN is initial.
    *                                                 remove linetype from generated payslip
          loop at p_form.
            objbin = p_form-linda.
            append objbin.
            line_cnt = line_cnt + 1.
          endloop.
          file_length = line_cnt * 1022.
    *                                                 create spool file of paylsip
          CALL FUNCTION 'SLVC_TABLE_PS_TO_SPOOL'
            EXPORTING
              i_file_length = file_length
            IMPORTING
              e_spoolid     = spool_id
            TABLES
              it_textdata   = objbin.
          IF sy-subrc EQ 0.
            WRITE spool_id.
          ENDIF.
          DESCRIBE table objbin.
          DATA PDF LIKE TLINE OCCURS 100 WITH HEADER LINE.
          CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
            EXPORTING
              SRC_SPOOLID                    = spool_id
              NO_DIALOG                      = ' '
              DST_DEVICE                     = 'MAIL'
    *      PDF_DESTINATION                =
    *    IMPORTING
    *      PDF_BYTECOUNT                  = l_no_of_bytes
    *      PDF_SPOOLID                    = l_pdf_spoolid
    *      LIST_PAGECOUNT                 =
    *      BTC_JOBNAME                    =
    *      BTC_JOBCOUNT                   =
            TABLES
              PDF                            = pdf
            EXCEPTIONS
              ERR_NO_ABAP_SPOOLJOB           = 1
              ERR_NO_SPOOLJOB                = 2
              ERR_NO_PERMISSION              = 3
              ERR_CONV_NOT_POSSIBLE          = 4
              ERR_BAD_DESTDEVICE             = 5
              USER_CANCELLED                 = 6
              ERR_SPOOLERROR                 = 7
              ERR_TEMSEERROR                 = 8
              ERR_BTCJOB_OPEN_FAILED         = 9
              ERR_BTCJOB_SUBMIT_FAILED       = 10
              ERR_BTCJOB_CLOSE_FAILED        = 11
              OTHERS                         = 12
          IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    *Download PDF file C Drive
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename = 'C:\itab_to_pdf.pdf'
          filetype = 'BIN'
        TABLES
          data_tab = pdf.
    * Transfer the 132-long strings to 255-long strings
    *  LOOP AT pdf.
    *    TRANSLATE pdf USING ' ~'.
    *    CONCATENATE gd_buffer pdf INTO gd_buffer.
    *  ENDLOOP.
    *  TRANSLATE gd_buffer USING '~ '.
    *  DO.
    *    it_mess_att = gd_buffer.
    *    APPEND it_mess_att.
    *    SHIFT gd_buffer LEFT BY 255 PLACES.
    *    IF gd_buffer IS INITIAL.
    *      EXIT.
    *    ENDIF.
    *  ENDDO.
          OBJHEAD = 'Objhead'.
          append OBJHEAD.
    * preparing email subject
          concatenate W_ENDDA(6)
                    ' Payslip-'
                    ITAB-ENAME+0(28)
                    ITAB-PERNR+4(4) ')'
                 into DOCDATA-OBJ_DESCR.
          DOCDATA-OBJ_NAME = 'Pay Slip'.
          DOCDATA-OBJ_LANGU = SY-LANGU.
          OBJTXT = 'Pay Slip.'.
          append OBJTXT.
    *prepare email lines
          OBJTXT = DOCDATA-OBJ_DESCR.
          append OBJTXT.
          OBJTXT = 'Please find enclosed your current payslip.'.
          append OBJTXT.
    * Write Attachment(Main)
    * 3 has been fixed because OBJTXT has fix three lines
          read table OBJTXT index 3.
    *    DOCDATA-DOC_SIZE = ( 3 - 1 ) * 255 + strlen( OBJTXT ).
          clear OBJPACK-TRANSF_BIN.
          OBJPACK-HEAD_START = 1.
          OBJPACK-HEAD_NUM = 0.
          OBJPACK-BODY_START = 1.
          OBJPACK-BODY_NUM = 3.
          OBJPACK-DOC_TYPE = 'RAW'.
          append OBJPACK.
    * Create Message Attachment
          ATT_TYPE = 'PDF'.
          describe table OBJBIN lines TAB_LINES.
          read table OBJBIN index TAB_LINES.
    *    OBJPACK-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + strlen( OBJBIN ).
          OBJPACK-TRANSF_BIN = 'X'.
          OBJPACK-HEAD_START = 1.
          OBJPACK-HEAD_NUM = 0.
          OBJPACK-BODY_START = 1.
          OBJPACK-BODY_NUM = TAB_LINES.
          OBJPACK-DOC_TYPE = ATT_TYPE.
          OBJPACK-OBJ_NAME = 'ATTACHMENT'.
          OBJPACK-OBJ_DESCR = 'Payslip'.
          append OBJPACK.
    * Create receiver list refresh RECLIST.
          clear RECLIST.
          RECLIST-RECEIVER = itab-USRID_long.
          translate RECLIST-RECEIVER to lower case.
          RECLIST-REC_TYPE = 'U'.
          append RECLIST.
    * Send the document
    *SO_NEW_DOCUMENT_ATT_SEND_API1
          call function 'SO_DOCUMENT_SEND_API1'
            exporting
              DOCUMENT_DATA = DOCDATA
              PUT_IN_OUTBOX = 'X'
              COMMIT_WORK = 'X'
    * IMPORTING
    *   SENT_TO_ALL =
    *   NEW_OBJECT_ID =
            tables
              PACKING_LIST  = OBJPACK
              OBJECT_HEADER = OBJHEAD
              CONTENTS_BIN  = pdf
              CONTENTS_TXT  = OBJTXT
    *   CONTENTS_HEX =
    *   OBJECT_PARA =
    *   OBJECT_PARB =
              RECEIVERS = RECLIST
            exceptions
              TOO_MANY_RECEIVERS = 1
              DOCUMENT_NOT_SENT = 2
              DOCUMENT_TYPE_NOT_EXIST = 3
              OPERATION_NO_AUTHORIZATION = 4
              PARAMETER_ERROR = 5
              X_ERROR = 6
              ENQUEUE_ERROR = 7
              others = 8.
          if SY-SUBRC NE 0.
            ITAB-MTEXT = 'Message Not Sent to : '.
          else.
            ITAB-MTEXT = 'Message Sent to : '.
          endif.
    *    else.
    *      ITAB-MTEXT = 'Message Not Sent to : '.
    *    endif.
        else.
          "SY-SUBRC Not = 0
          ITAB-MTEXT = 'Payroll data not found : '.
        endif.
        "end of SY-SUBRC = 0.
        modify ITAB.
      endloop. "end loop at ITAB
      sort ITAB by MTEXT PERNR.
      loop at ITAB.
        at new MTEXT.
          uline.
          write : / ITAB-MTEXT color 4 intensified on.
          write : / 'Emp. Code' color 2 intensified on,
                 12 'Emp. Name' color 2 intensified on,
                 54 'Email ID' color 2 intensified on.
        endat.
        write : / ITAB-PERNR, 12 ITAB-ENAME, 54 ITAB-USRID_LONG.
      endloop.

  • How-To "Refresh a table of data after inserting or deleting"

    I'd like to say a word on the how-to article "How to refresh a table of data after inserting or deleting a row using ADF".
    (http://www.oracle.com/technology/products/jdev/howtos/1013/updtable/index.html?_template=/ocom/technology/content/print)
    I spent a lot of time on it because I needed help in implementing simple CRUD functionality on a table, using JSF-ADF-TopLink technologies.
    While the the article does provide correct steps, it is in one important place not specific enough, so the reader may easily get stuck. In section "Refresh the data table", point 1: when you double click on the removeEntity() button, in Structure window, then you do not get the required dialog. You get CommandButton Properties dialog.
    You must click on the removeEntity() button in Editor's Design view. But even there you may get the CommandButton Properties dialog, not managed beans dialog.
    You may resolve that by going to JSF configuration file, faces-config.xml, and switch to Overview view. This will show you the managed beans that you have.
    Then, you may already have a backing bean for the page. You can use that and avoid creating a new managed bean.
    I could understand what the operations mean only after very careful reading of "Creating More Complex Pages", section "Overriding Declarative Methods" in JDeveloper Help (or in ADF Developer's Guide PDF document).
    In general: I believe that "ADF bindings" need more conceptual explanation, maybe in form of an article. Grammatical form "bindings" may create a false understanding that "bindings" are just references. But they are not -- ADF bindings are active objects that handle traffic between UI components and Data Controls. It seems that "bindings" even communicate among themselves. Maybe it would be more understandable to differentiate strictly between "binding objects" (or "binders"?), binding object definitions and binding object references.
    It would be very helpful to have a diagram showing grahically what specific binder objects are created in a small apllication (2-3 pages using 1-2 tables), with whom they communicate and what type of data is passed on.
    Priit

    Hi
    Thanks for your infos.
    Yes exactly I use almost the same code you have post here.
    Could You answer to my next questions?
    First - >what do you mean by saying that "it's not good idea using refreshing in IE?" Of course I use refreshing in backing_bean for my button "remove" that removes row, commit changes to database and refresh table, almost the same as You said in your post:
    Code in backing_bean is and comments on difference to Your code is below:
    public commandButton2_action1(){
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding("removeEntity");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    //above remove entity, but I dont now if it do commit to database? So i do it below
    OperationBinding commit1 = bindings.getOperationBinding("Commit");
    commit1.execute();
    //and at the end I refresh my table, "findAllRezerwacja1 - it is an id of the methodAction, not the iterator -> is it ok? or should I change to Iterator id?
    OperationBinding requery = bindings.getOperationBinding("findAllRezerwacja1");
    requery.execute();
    return null;
    Page Definition code for this:
    <methodAction id="findAllRezerwacja1"
    InstanceName="SessionEJBLocal.dataProvider"
    DataControl="SessionEJBLocal" MethodName="findAllRezerwacja"
    RequiresUpdateModel="true" Action="999"
    ReturnName="SessionEJBLocal.methodResults.SessionEJBLocal_dataProvider_findAllRezerwacja_result"/>
    <table id="findAllRezerwacja2" IterBinding="findAllRezerwacja1Iter">
    <AttrNames>
    <Item Value="dataDo"/>
    <Item Value="dataOd"/>
    <Item Value="idRezerwacja"/>
    <Item Value="liczbaUczestnikow"/>
    <Item Value="prowadzacy"/>
    <Item Value="uwagi"/>
    </AttrNames>
    </table>
    <methodAction id="removeEntity" InstanceName="SessionEJBLocal.dataProvider"
    DataControl="SessionEJBLocal" MethodName="removeEntity"
    RequiresUpdateModel="true" Action="999">
    <NamedData NDName="entity"
    NDValue="${bindings.findAllRezerwacja2.currentRow.dataProvider}"
    NDType="java.lang.Object"/>
    </methodAction>
    <action id="Commit" IterBinding="findAllRezerwacja1Iter"
    InstanceName="SessionEJBLocal.dataProvider"
    DataControl="SessionEJBLocal" RequiresUpdateModel="true"
    Action="2"/>
    </bindings>
    //and rest of code for Iterator etc
    My second question is, why when you use refresh button in IE (I know is not recommended as You said, but sometimes user do it, so I want prevent situations that I will describe here) so when I press refresh button in IE exactly after removing one row by clicking my button, refreshing by pressing IE button is doing the same --> is deleting next row. How to stop deleting row, when for example user would press IE refresh button after pressing remove button for table. If I change selection in table after deleting row, and press refresh button in IE, instead of deleting row, I got error message: JBO-29000: JBO-35007: and
    JBO-35007. So where Im doing wrong. Maybe I should do sth with postback ? Could You help me? Thanks in advance
    Last one question: what is the difference between using delete and removeEntity from operations node? Im now reading carefully ADF Dev Guide, so I hope I can find infos there? But if You know, please answer to this question.
    Thanks

  • How to Populate Internal table data to Table Control in a Report Program

    Dear All,
           How to Populate Internal table data to Table Control in a Report Program? It is a pure report program with out any Module pool coding involved, which is just used to display data. Till now it is being displayed in a report. Now the user wants the data to be displayed in a table control. Could someone tell me how to go about with this.
    Thanks in Advance,
    Joseph Reddy

    If you want to use a table control, you will need to create a screen.
    In your report....
    start-of-selection.
    perform get_data.  " Get all your data here
    call screen 100. " Now present to the user.
    Double click on the "100" in your call screen statement.  This will forward navigate you to the screen.  If you have not created it yet, it will ask you if you want to create it, say yes.  Go into screen painter or layout of the screen.  Use the table control wizard to help you along the process.  It will write the code for you.  Since it is an output only table control, it will be really easy with not a lot of code. 
    A better way to present the data to the user would be to give it in a ALV grid.  If you want to go that way, it is a lot easier.  Here is a sample of the ALV function module.  You don't even have to create a screen.
    report zrich_0004
           no standard page heading.
    type-pools slis.
    data: fieldcat type slis_t_fieldcat_alv.
    data: begin of imara occurs 0,
          matnr type mara-matnr,
          maktx type makt-maktx,
          end of imara.
    * Selection Screen
    selection-screen begin of block b1 with frame title text-001 .
    select-options: s_matnr for imara-matnr .
    selection-screen end of block b1.
    start-of-selection.
      perform get_data.
      perform write_report.
    *  Get_Data
    form get_data.
      select  mara~matnr makt~maktx
                into corresponding fields of table imara
                  from mara
                   inner join makt
                     on mara~matnr = makt~matnr
                        where mara~matnr in s_matnr
                          and makt~spras = sy-langu.
    endform.
    *  WRITE_REPORT
    form write_report.
      perform build_field_catalog.
    * CALL ABAP LIST VIEWER (ALV)
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                it_fieldcat = fieldcat
           tables
                t_outtab    = imara.
    endform.
    * BUILD_FIELD_CATALOG
    form build_field_catalog.
      data: fc_tmp type slis_t_fieldcat_alv with header line.
      clear: fieldcat. refresh: fieldcat.
      clear: fc_tmp.
      fc_tmp-reptext_ddic    = 'Material Number'.
      fc_tmp-fieldname  = 'MATNR'.
      fc_tmp-tabname   = 'IMARA'.
      fc_tmp-outputlen  = '18'.
      fc_tmp-col_pos    = 2.
      append fc_tmp to fieldcat.
      clear: fc_tmp.
      fc_tmp-reptext_ddic    = 'Material'.
      fc_tmp-fieldname  = 'MAKTX'.
      fc_tmp-tabname   = 'IMARA'.
      fc_tmp-outputlen  = '40'.
      fc_tmp-col_pos    = 3.
      append fc_tmp to fieldcat.
    endform.
    Regards,
    Rich Heilman

  • How to convert Internal Table to Cluster Table ?

    How to convert Internal Table to Cluster Table ?

    Use  :
    EXPORT itab TO DATABASE dbtab(ar) ID key.
    <i>EXPORT obj1 ... objn TO DATABASE dbtab(ar) ID key.
    Additions:
    1. ... = f (for each field you want to export)
    2. ... FROM f (for each field you want to export)
    3. ... CLIENT g before ID key )
    4. ... USING form
    5. ... FROM wa (as last addition or after dbtab(ar))
    In an ABAP Objects context, a more severe syntax check is performed that in other ABAP areas. See Implicit field names not allowed with clusters and Table work areas not allowed.
    Effect
    Stores a data cluster in database table dbtab. The specified objects obj1 ... objn (fields, structures, or tables) are stored as a single cluster in the database table dbtab.
    The specified database table dbtab must have a standard structure.
    The database table dbtab is divided into various logically-related sections (ar, two-character name).
    You can export a collection of data objects (a data cluster) to a part of the database using a key (field key).
    You can import individual data objects from this collection using the IMPORT statement.
    Notes
    In classes, you must always assign explicit names to the data objects you want to export, that is, you must use either addition 1 or addition 2.
    In classes, you must always specify the work area explicitly, that is, addition 5 is obligatory.
    The table dbtab that appears after DATABAE must be declared under TABLES (except in addition 5).
    You cannot export the header lines of internal tables. If you specify the name of an internal table with header line, the system always exports the body of the table.
    You cannot export data, object, or interface references.
    The data is stored in the database, and is consequently not actually stored until a database commit occurs (see LUW). Until this point, you can undo all of your changes using a database rollback (see Programming Transactions).
    Example
    Exporting two fields and an internal table to the database table INDX:
    TABLES INDX.
    TYPES: BEGIN OF ITAB3_TYPE,
              CONT(4),
           END OF ITAB3_TYPE.
    DATA: INDXKEY LIKE INDX-SRTFD VALUE 'KEYVALUE',
          F1(4), F2 TYPE P,
          ITAB3 TYPE STANDARD TABLE OF ITAB3_TYPE WITH NON-UNIQUE
                     DEFAULT KEY INITIAL SIZE 2,
          WA_INDX TYPE INDX.
    Fill the data fields before CLUSTR
    before the actual export
    INDX-AEDAT = SY-DATUM.
    INDX-USERA = SY-UNAME.
    Export der Daten.
    EXPORT F1    FROM F1
           F2    FROM F2
           ITAB3 FROM ITAB3
           TO DATABASE INDX(ST)  FROM WA_INDX ID INDXKEY.
    </i>
    Regards

  • How to access internal table data from webdynpro to Flex application.

    Hi Connoisseur
    The data transfer from Abap WebDeypro to flex island works well. I followed , there is an example from Thomas Jung (by the way as always Great Work) and  Karthikeyan Venkatesan (Infosys) but this example covers simple type only.
    There is no example with complex types like arrayCollection which handle the transfer of data from flex to WebDynpro.
    i tried to do pass internal table value  to flex-datagrid.but its not work.
    i would like to know
    1.how to access internal table data from webdynpro to Flex application.
    2.how to pass the internal table to flex-datagrid.
    2.how to pass dynamically in ADOBE flex.
    3. how to do Flex is receiving the wd context data?
    4. how can we update WD context with FLEX data.
    Ple give me sample example and step by step procedure.
    Regards
    laxmikanth

    Hi Laxmikanth,
    Please refer this...
    Flash island: update complex type from flex
    Cheers..
    kris.

  • How to Convert internal table data into text output and send mail in ABAP

    Hi All,
    Good Morning.
    Taking a glance at a code that converts internal table data to an Excel file in ABAP. also checked how to send this excel to mailing list as attachment.
    But thought of doing it without excel.
    I mean, I have an internal table which contains fields of all types (character,integer,date,time). Since it is only around 4 to 5 rows in it (output),why to convert it to excel. not required!!.  Instead I  want to send this output to User's mails as Normal mail body with No attachments.
    Could anybody please suggest me a way as to how to send internal table data as a mail ( not as an excel or PDF etc).
    as of now my findings are, it is quite complex to convert internal table data to email (Text) format. but i believe if there is some way of doing it.
    Best Regards
    Dileep VT

    here's something I have used in the past where we send out information about failed precalculation settings (which are stored in internal table gt_fail)
    notice we use gt_text as "mail body"
    TRY.
    *     -------- create persistent send request ------------------------
           gv_send_request = cl_bcs=>create_persistent( ).
    *     -------- create and set document -------------------------------
    *     create text to be sent
           wa_line = text-001.
           APPEND wa_line TO gt_text.
           CLEAR wa_line.
           APPEND wa_line TO gt_text.
           LOOP AT gt_fail ASSIGNING <fs_fail>.
             MOVE <fs_fail>-retry_count TO gv_count.
             CONCATENATE text-002
                         <fs_fail>-setting_id
                         text-003
                         gv_count
                         INTO wa_line SEPARATED BY space.
             APPEND wa_line TO gt_text.
             CLEAR wa_line.
           ENDLOOP.
           APPEND wa_line TO gt_text.
           wa_line = text-007.
           APPEND wa_line TO gt_text.
    *     create actual document
           gv_document = cl_document_bcs=>create_document(
                           i_type    = 'RAW'
                           i_text    = gt_text
                           i_length  = '12'
                           i_subject = 'Failed Precalculation Settings!' ).
    *     add document to send request
           CALL METHOD gv_send_request->set_document( gv_document ).
    *     --------- set sender -------------------------------------------
           gv_sender = cl_sapuser_bcs=>create( sy-uname ).
           CALL METHOD gv_send_request->set_sender
             EXPORTING
               i_sender = gv_sender.
    *     --------- add recipient (e-mail address) -----------------------
           LOOP AT s_email INTO wa_email.
             MOVE wa_email-low TO gv_email.
             gv_recipient = cl_cam_address_bcs=>create_internet_address(
                                               gv_email ).
             CALL METHOD gv_send_request->add_recipient
               EXPORTING
                 i_recipient = gv_recipient
                 i_express   = 'X'.
           ENDLOOP.
    *     ---------- set to send immediately -----------------------------
           CALL METHOD gv_send_request->set_send_immediately( 'X' ).
    *     ---------- send document ---------------------------------------
           CALL METHOD gv_send_request->send(
             EXPORTING
               i_with_error_screen = 'X'
             RECEIVING
               result              = gv_sent_to_all ).
           IF gv_sent_to_all = 'X'.
             WRITE text-004.
           ENDIF.
           COMMIT WORK.
    *   exception handling
         CATCH cx_bcs INTO gv_bcs_exception.
           WRITE: text-005.
           WRITE: text-006, gv_bcs_exception->error_type.
           EXIT.
       ENDTRY.
    with the following declarations
    * TABLES                                                               *
    TABLES:
       adr6,
       rsr_prec_sett.
    * INTERNAL TABLES & WORK AREAS                                         *
    DATA:
       gt_fail          TYPE SORTED TABLE OF rsr_prec_sett
                             WITH UNIQUE KEY setting_id run_date,
       gt_text          TYPE bcsy_text,
       wa_fail          LIKE LINE OF gt_fail,
       wa_line(90)      TYPE c.
    FIELD-SYMBOLS:
       <fs_fail>        LIKE LINE OF gt_fail.
    * VARIABLES                                                            *
    DATA:
       gv_count(4)      TYPE n,
       gv_send_request  TYPE REF TO cl_bcs,
       gv_document      TYPE REF TO cl_document_bcs,
       gv_sender        TYPE REF TO cl_sapuser_bcs,
       gv_recipient     TYPE REF TO if_recipient_bcs,
       gv_email         TYPE adr6-smtp_addr,
       gv_bcs_exception TYPE REF TO cx_bcs,
       gv_sent_to_all   TYPE os_boolean.
    * SELECTION-SCREEN                                                     *
    SELECT-OPTIONS:
       s_email          FOR adr6-smtp_addr NO INTERVALS MODIF ID sel.
    DATA:
       wa_email         LIKE LINE OF s_email.

  • Submititng the program to another program  using internal table values

    Hi All,
    How to Submit from one program to another program using internal table values minimum 7 int tables without using the seletion screen
    thanks
    raj

    Hi All,
    Thank you very much for your inputs.
    i am facing another issue:
    For each 10,000 records it should trigger a job  (we are trying to call a program)  were the validation will be done only through the other program.
    please find the code mentioned below :
    TABLES : but000.
    DATA:  int_bp LIKE but000 OCCURS 0 WITH HEADER LINE.
    data released like BTCH0000-CHAR1.
    DATA: jobnumber LIKE tbtcjob-jobcount, " Job ID and
          jobname LIKE tbtcjob-jobname, " job name.
          startdate LIKE tbtcjob-sdlstrtdt, " Start-time
          starttime LIKE tbtcjob-sdlstrttm, " window specs.
          laststartdate LIKE tbtcjob-laststrtdt,
          laststarttime LIKE tbtcjob-laststrttm,
          job_released LIKE btch0000-char1. " JOB_CLOSE: Was job released?
    DATA : l1 TYPE i,
           b_size TYPE i,
           b_cursor TYPE cursor.
    INITIALIZATION.
      b_size = 5000.
    START-OF-SELECTION.
      OPEN CURSOR WITH HOLD b_cursor
         FOR
         SELECT *
         FROM but000
         WHERE bpkind = 'AA'.
      IF sy-subrc = 0.
        DO.
          FETCH NEXT CURSOR b_cursor INTO TABLE int_bp
                                               PACKAGE SIZE b_size.
    Note : here in this point  we are getting a dump for the second job trigger.
          IF sy-subrc = 0.
            CLEAR jobname.
            CONCATENATE sy-repid sy-datum sy-uzeit INTO jobname.
    export int_bp to memory id 'ABC'.
            CALL FUNCTION 'JOB_OPEN'
                 EXPORTING
                      jobname          = jobname
                 IMPORTING
                      jobcount         = jobnumber.
                EXCEPTIONS
                     cant_create_job  = 1
                     invalid_job_data = 2
                     jobname_missing  = 3
                     OTHERS           = 4
    CALL FUNCTION 'JOB_SUBMIT'
          EXPORTING
               authcknam = sy-uname
               jobname   = jobname
               jobcount  = jobnumber
               report    = 'YTEST_RRR'.
               variant   = lv_variant.
       SUBMIT ytest_rrr
          VIA JOB jobname NUMBER jobnumber
          AND RETURN.
        CALL FUNCTION 'JOB_CLOSE'
          EXPORTING
           event_periodic                    = 'X'
            jobcount                          = jobnumber
            jobname                           = jobname
            strtimmed                         = 'X'
          IMPORTING
            job_was_released                  = released
            else.
            EXIT.
          ENDIF.
        ENDDO.
    calling program :
    REPORT YTEST_RRR .
    data itab1 like but000 occurs 0 with header line.
    data l type i.
    import itab1 from memory id 'ABC' .
    describe table itab1 lines l.
    free memory id 'ABC'.
    write:/ 'total records are:', l.
    Please give your suggestion why its going for  dump in the second iteration.
    thanks in advance.

  • How to  write  internal table data vertically . Records vertically.

    Hi pals,
          How to write internal table records vertically .
    suppose the records are
    a1 a2 a3
    b1 b2 b3
    we need to display
    a1  b1
    a2  b2
    a3  b3
    Thanks in advance.
    balaji.T

    Just check the code
    DATA: BEGIN OF itab OCCURS 0,
            f1 TYPE i,
            f2 TYPE i,
            f3 TYPE i,
          END OF itab.
    DATA pos TYPE i.
    "Define your lines where you want to print here...
    DATA line1 TYPE i VALUE 10.
    DATA line2 TYPE i VALUE 12.
    DATA line3 TYPE i VALUE 14.
    itab-f1 = '1'.
    itab-f2 = '10'.
    itab-f3 = '100'.
    APPEND itab.
    itab-f1 = '2'.
    itab-f2 = '20'.
    itab-f3 = '200'.
    APPEND itab.
    itab-f1 = '3'.
    itab-f2 = '30'.
    itab-f3 = '300'.
    APPEND itab.
    itab-f1 = '4'.
    itab-f2 = '40'.
    itab-f3 = '400'.
    APPEND itab.
    loop at itab.
    write : / itab-f1,itab-f2,itab-f3.
    endloop.
    LOOP AT itab.
      pos = pos + 10.
      SKIP TO LINE line1.
      POSITION pos.
      WRITE itab-f1.
      SKIP TO LINE line2.
      POSITION pos.
      WRITE itab-f2.
      SKIP TO LINE line3.
      POSITION pos.
      WRITE itab-f3.
    ENDLOOP.

Maybe you are looking for