Very-urgent----ALV as email

Hai Gurus ,
            What is the short key to run a program in background .. ?
             I want to run a program (ALV report)in background to get a spool number .after this I want to send this report in email as PDF format ..  
         very urgent .. can any one help ...

Hi,
BackGround : "CTRL" + "F9".
For Spool to PDF and Email, check the following ABAP code : RSTXPDFT4.
( For spool 2 PDF : FM : <b>'CONVERT_ABAPSPOOLJOB_2_PDF'</b>
For email with PDF attached : FM : <b>'SO_DOCUMENT_SEND_API1'</b> )
Hope this helps,
Erwan

Similar Messages

  • Very urgent regarding ALV

    Hi all,
    I have displayed data in alv.and the error condition is that if for a material if it has more than one S as ok_status records then it should throw an error. This logic is working fine.
    Now suppose at first time user had entered S through keyboard which fails the condition so it throws an error first time.
    Now user can change the ok  status back to I or O from S (through keyboard although f4 help is available) which satisfies the conditon so that record should be saved. but when user presses save button then in the ALV display the changed status I or O for that record again converted back to status S automatically. and again gives an error.
    if we try third time then it allows to save with record other than s ok status i.e. I or O.
    this problem is comming only when we change the value through keyboard. If we select value using f4 help then whole logic is working fine, no problem at all.
    Can you please help me out in this regard
    Its very urgent.
    Thanks & Regards
    Ashutosh.

    Hi,
    to exclude toolbar buttons..
      DATA: LT_EXCLUDE TYPE UI_FUNCTIONS.
    DATA LS_EXCLUDE TYPE UI_FUNC.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY_ROW.
      APPEND LS_EXCLUDE TO LT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_DELETE_ROW.
      APPEND LS_EXCLUDE TO LT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_APPEND_ROW.
      APPEND LS_EXCLUDE TO LT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_INSERT_ROW.
      APPEND LS_EXCLUDE TO LT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_MOVE_ROW.
      APPEND LS_EXCLUDE TO LT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY.
      APPEND LS_EXCLUDE TO LT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_CUT.
      APPEND LS_EXCLUDE TO LT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE.
      APPEND LS_EXCLUDE TO LT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE_NEW_ROW.
      APPEND LS_EXCLUDE TO LT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_UNDO.
      APPEND LS_EXCLUDE TO LT_EXCLUDE.
    CALL METHOD G_GRID1->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
    <b>      IT_TOOLBAR_EXCLUDING = LT_EXCLUDE</b>
          IS_LAYOUT            = GS_LAYOUT
        CHANGING
          IT_FIELDCATALOG      = IT_FIELDCAT
          IT_OUTTAB            = IT_FINAL[].
    and you told you are using REUSE_ALV_GRID_DISPLAY_LVC
    then in the user_command do this....
    then your problem will be solved.
    in the top you declare this..
      DATA: REF_GRID TYPE REF TO CL_GUI_ALV_GRID.
    FORM USER_COMMAND  USING R_UCOMM LIKE SY-UCOMM
                             RS_SELFIELD TYPE SLIS_SELFIELD.
    *then insert the following code in your USER_COMMAND routine...
      IF REF_GRID IS INITIAL.
        CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
          IMPORTING
            E_GRID = REF_GRID.
      ENDIF.
      IF NOT REF_GRID IS INITIAL.
        CALL METHOD REF_GRID->CHECK_CHANGED_DATA
      ENDIF.
    ENDFORM.
    Regards
    vijay

  • Logic for Refreshing the ALV Report (Very Urgent)

    Hi Experts,
    My <b>ALV report</b> needs a <b>refresh button</b> on the output.
    The <b>Refresh button</b> should be available to allow user to keep this report on screen and <b>refresh regularly</b> rather than <b>going back</b> and <b>running it again.</b>
    I am using <b>Function modules</b> and not <b>OOPS Concept</b> here.............As i am<b> unaware</b> of OOPS Please provide me solution in <b>FM's Only</b>.
    Kindly send me <b>sample logic</b> for this, <b>Very urgent</b> if ur reply is helpfull.... u will be <b>rewarded heavily</b>.......................
    THanks in advance.
    Rajesh Kumar

    Hi,
    This mean to say that if you have a 'refresh' push button in your gui status, every time you press the button, the list should get refreshed.
    In ALV, to refresh the table you have to call the method "refresh_table_display". 
    It has the syntax very similar to creating the table. 
    It has two parameters. In the first one, you can mention if you want to refresh only the data (the icons are not refreshed) 
    or 
    if you want to refresh only the icons around the grid (the data is not refreshed - this option is mostly not used in day to day applications).
    the synatx is :-
    call method grid (name of grid )->refresh_table_display
    exporting
    IS_STABLE = <STRUCT OF TYPE LVC_S_STBL> (THIS IS FOR DATA REFRESHING)
    I_SOFT_REFRESH = <VARIABLE OF CHAR 01>  (THIS IS FOR ICON REFRESHING).
    Regards,
    Bhaskar

  • CODING  EXAMPLE - LAYOUT ALV - ( very urgent )

    Could any body please give me the  coding example
    where slis_layout_alv is used ? Please treat this as very urgent.
                              Yours sincerely,
                               SAURAV  LAHIRY

    Hi Saurav,
    Please check this code.
    REPORT  y56098rdup_list
                    NO STANDARD PAGE HEADING LINE-SIZE 240 LINE-COUNT 65(8) .
    Declartion of Tables.
    TABLES: ztril_logtable,zreasoncodes,zsdcustxref, usr21, adrp.
      TABLES-POOLS
    TYPE-POOLS: slis.
    Internal tables declarations.
    Declaration of output internal table
    DATA: BEGIN OF tb_output OCCURS 0,
            user_id TYPE xubname,                                " Requestor ID
            role TYPE zrole,                                     "Role
            kunnr TYPE kunnr ,                                   "Customer Number 1
            customer_name    TYPE name1,                         "Customer Name
            stras TYPE stras_gp,                                 "Street Address
            ort01 TYPE city,                                     "City
            regio TYPE regio,                                    "State
            pstlz TYPE pstlz,                                    "Postal Code
            land1 TYPE land1_gp,                                 "COUNTRY CODE
            po_box TYPE ad_pobx,                                 "PO Box Number
            tril_po_postal  TYPE zpobox_postal,                  "PO BOX Postal Code
            tril_err_msg TYPE zerr_message,                      "Error Message
            reason_type TYPE zreason_type,                       "Reason Type
            reason_code TYPE zreason_code,                       "Reason Code
            perc_prob TYPE zprobability ,                        "Probability Percentage
            pattern_number TYPE z_pattern_no,                     "Match Pattern Number
            country_code TYPE land1,                             "COUNTRY CODE
            user_id_name(92) TYPE c,                             "UserID + Fast Name + Last Name
            zlkunnr LIKE zsdcustxref-zlkunnr,                    "Legacy Customer NO
            saplegcustno(20) TYPE c,                             "SAP + Legacy Customer No
            reason_desc LIKE zreasoncodes-reason_desc,           "Reason Description
            saplegcustno1(20) TYPE c,
          END OF tb_output.
    Declation of work area.
    DATA: wa_output LIKE tb_output.
    Declaration of Internal Table.
    DATA: tb_fill_output LIKE tb_output OCCURS 0 WITH HEADER LINE,
          wa_fill_output LIKE tb_fill_output.
    Declaration of internal table for ZREASONCODES
    DATA: BEGIN OF tb_reasoncodes OCCURS 0.
            INCLUDE STRUCTURE zreasoncodes.
    DATA: END OF tb_reasoncodes.
    DATA: wa_reasoncodes LIKE tb_reasoncodes.
    Declaration of internal table ZSDCUTXREF.
    DATA: BEGIN OF tb_zsdcustxref OCCURS 0,
            zlkunnr LIKE zsdcustxref-zlkunnr,                      " Legacy Customer No
            zlsourc LIKE zsdcustxref-zlsourc,                      " Legacy customer source code
            kunnr   LIKE zsdcustxref-kunnr,                        " Customer No
          END OF tb_zsdcustxref.
    Declation of work area.
    DATA: wa_zsdcustxref LIKE tb_zsdcustxref.
    Declaration of internal table for USR21.
    DATA: BEGIN OF tb_usr21 OCCURS 0,
           bname      LIKE usr21-bname,                           " USER NAME IN USER MASTER RECORD
           persnumber LIKE usr21-persnumber,                      " PERSON NUMBER
           name_first LIKE adrp-name_first,                       " FIRST NAME
           name_last  LIKE adrp-name_last,                        " LAST NAME
          END OF tb_usr21.
    Declation of work area.
    DATA: wa_usr21 LIKE tb_usr21.
    Declaration of internal table for ADRP.
    DATA: BEGIN OF tb_adrp OCCURS 0,
           persnumber LIKE adrp-persnumber,                       " PERSON NUMBER
           name_first LIKE adrp-name_first,                       " FIRST NAME
           name_last  LIKE adrp-name_last,                        " LAST NAME
          END OF tb_adrp.
    DATA: wa_adrp LIKE tb_adrp.
      Declaration for fieldcatalog
    DATA: tb_fieldcat TYPE slis_t_fieldcat_alv,
          wa_fieldcat TYPE slis_fieldcat_alv.
      Declaration for events
    DATA: tb_events TYPE slis_t_event,
          wa_event TYPE slis_alv_event.
      Declaration for Layout
    DATA: tb_layout TYPE slis_layout_alv,
          wb_layout TYPE slis_layout_alv.
    DATA: wa_line TYPE slis_listheader,
          tb_list_header TYPE slis_t_listheader.
    DATA:   g_date1(40) TYPE c,
            g_date2(40) TYPE c,
            g_date3(80) TYPE c.
      Declaration for Selection Screen Fields
    SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_userid FOR ztril_logtable-user_id,                  "Requestor ID
                    s_r_type FOR zreasoncodes-reason_type,                " Reason Type
                    s_r_code FOR zreasoncodes-reason_code
                                                MATCHCODE OBJECT zr_code. " Reason Code
    PARAMETERS    : p_frmdat LIKE ztril_logtable-curr_date OBLIGATORY,     " from date
                    p_to_dat LIKE ztril_logtable-curr_date OBLIGATORY.     " to date
    SELECTION-SCREEN: END OF BLOCK b1.
      Declaration for Varialbes
    DATA: g_sc_no(20) TYPE c,     " To combine the SAP & Legacy Customer No
          g_user_name(92) TYPE c. " To concatnate the Userid and User Name.
    DATA : tb_repid LIKE trdir-name.
    tb_repid = 'Y56098RDUP_LIST'.
    *tb-repid type sy-repid.
    DATA: BEGIN OF tb_user OCCURS 0,
           user_id LIKE ztril_logtable-user_id,
          END OF tb_user.
    To get the P_USERID F4 Functionality for LOW and HIGH.
    AT SELECTION-SCREEN ON  VALUE-REQUEST FOR s_userid-low.
      SELECT user_id FROM ztril_logtable INTO TABLE tb_user.
      SORT tb_user.
      DELETE ADJACENT DUPLICATES FROM tb_user.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'S_USERID'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = 'S_USERID'
          value_org       = 'S'
        TABLES
          value_tab       = tb_user
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc <> 0.
        MESSAGE e210(zsd).
      ENDIF.
    AT SELECTION-SCREEN ON  VALUE-REQUEST FOR s_userid-high.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'S_USERID'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = 'S_USERID'
          value_org       = 'S'
        TABLES
          value_tab       = tb_user
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc <> 0.
        MESSAGE e210(zsd).
      ENDIF.
    At selection screen event.
    AT SELECTION-SCREEN.
    Validation of User_id(USER_ID) & Reason Type(REASON_CODE)
      PERFORM checking_user_id.
    Validation of Reason type from the table ZREASONCODES
      PERFORM check_reasontype.
    Validation of Reason code from the table ZREASONCODES
      PERFORM check_reasoncode.
    Validation for checking From-Date
      PERFORM checking_from_date.
    Validation for checking To-Date
      PERFORM checking_to_date.
    Start of selection event.
    START-OF-SELECTION.
    REFRESH data & clear data.
      PERFORM refresh_tables.
    Get ZTRIL_LOGTABLE Data.
      PERFORM get_tril_logtable.
    Get data from ZREASONCODE.
      PERFORM get_reasoncode_data.
    Get the data Customer No from ZSDCUSTREF based on ZTRIL_LOGTABLE-KUNNR
      PERFORM get_sdcustrefdata.
    Get the data First Name and Last Name
      PERFORM get_data_from_usr21_adrp.
    Updateing the output internal table i.e. IT_OUTPUT  data
      PERFORM fill_output_data.
    Displaying output data with two different Rows.
      PERFORM output_data.
    Populate the field catelog.
      PERFORM build_fieldcatlog.
    Declartion Events.
      PERFORM event_call.
    Top of page Information
      PERFORM top_of_page.
    Declation of Layout
      PERFORM layout USING tb_layout.
    To get the Output Format( Simple List/ ALV )
      PERFORM grid_display.
    *&      Form  get_tril_logtable
          To get the data from table ztril_logtable
    FORM get_tril_logtable.
      REFRESH: tb_output.
    Reading data from the table ZTRIL_LOGTABLE
      SELECT user_id
             role                      "Role
             kunnr                     "Customer Number 1
             customer_name             "Customer Name
             stras                     "Street Address
             ort01                     "City
             regio                     "State
             pstlz                     "Postal Code
             land1                     "COUNTRY CODE
             po_box                    "PO Box Number
             tril_po_postal            "PO BOX Postal Code
             tril_err_msg              "Error Message
             reason_type               "Reason Type
             reason_code               "Reason Code
             perc_prob
             pattern_number
             FROM ztril_logtable INTO
             CORRESPONDING FIELDS OF
             TABLE tb_output
             WHERE
            ( curr_date GE p_frmdat AND curr_date LE p_to_dat )
           ( curr_date BETWEEN  p_frmdat AND  p_to_dat )
             AND
             user_id IN s_userid
             AND reason_code IN s_r_code
             AND reason_type IN s_r_type.
      IF sy-subrc NE 0.
        MESSAGE i202(zsd).
      ENDIF.
    ENDFORM.                    " get_tril_logtable
    *&      Form  get_reasoncode_data
          To get the Reason code and Reason type
    FORM get_reasoncode_data .
    checking internal table initial data.
      IF NOT tb_output[]  IS INITIAL.
        SELECT reason_type
               reason_code
               reason_desc
               FROM zreasoncodes
               INTO CORRESPONDING FIELDS OF TABLE tb_reasoncodes
               WHERE reason_type IN s_r_type
               AND reason_code IN s_r_code.
      ENDIF.
    ENDFORM.                    " get_reasoncode_data
    *&      Form  get_sdcustrefdata
          To get the legasy customer number data
    FORM get_sdcustrefdata .
      IF NOT tb_output[] IS INITIAL.
        SELECT  zlkunnr                      " Legacy Customer No
                zlsourc                      " Legacy customer source code
                kunnr                        " Customer No
                FROM zsdcustxref INTO TABLE tb_zsdcustxref
                FOR ALL ENTRIES IN tb_output
                WHERE kunnr EQ tb_output-kunnr.
      ENDIF.
    ENDFORM.                    " get_sdcustrefdata
    *&      Form  fill_output_data
          To get the final data into the Internal Table
    FORM fill_output_data .
      IF NOT tb_output[] IS INITIAL.
        SORT tb_output BY role user_id.
        LOOP AT tb_output INTO wa_output.
          READ TABLE tb_reasoncodes INTO wa_reasoncodes
                        WITH KEY
                        reason_type = wa_output-reason_type
                        reason_code = wa_output-reason_code BINARY SEARCH.
          IF sy-subrc EQ 0.
            wa_output-reason_desc = wa_reasoncodes-reason_desc.
            CLEAR wa_reasoncodes.
          ENDIF.
          READ TABLE  tb_zsdcustxref INTO wa_zsdcustxref
                                     WITH KEY
                                     kunnr = wa_output-kunnr.
          IF sy-subrc EQ 0.
            CONCATENATE  wa_zsdcustxref-zlkunnr
                         wa_zsdcustxref-zlsourc
                           INTO
                         g_sc_no SEPARATED BY ' - '.
           wa_output-saplegcustno1 = wa_zsdcustxref-zlkunnr.
            wa_output-saplegcustno1 = g_sc_no.
          ELSE.
            wa_output-saplegcustno = wa_output-kunnr.
            CLEAR: wa_reasoncodes,g_sc_no.
          ENDIF.
          READ TABLE tb_usr21 INTO wa_usr21 WITH KEY bname = wa_output-user_id.
          IF sy-subrc EQ 0.
           CONCATENATE wa_usr21-bname
            CONCATENATE   wa_usr21-name_first
                          wa_usr21-name_last
                             INTO
                          g_user_name SEPARATED BY space.
            wa_output-user_id_name = g_user_name.
          ENDIF.
          MODIFY tb_output FROM wa_output
                                TRANSPORTING
                                reason_desc
                                saplegcustno
                                user_id_name
                                saplegcustno1.
          CLEAR: g_user_name,wa_usr21, wa_adrp.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " fill_output_data
    *&      Form  get_data_from_USR21_ADRP
          To get the first name and last name from ADRP table
    FORM get_data_from_usr21_adrp .
      IF NOT tb_output[] IS INITIAL.
        SELECT bname
               persnumber
               FROM usr21
               INTO CORRESPONDING FIELDS OF TABLE tb_usr21
               FOR ALL ENTRIES IN tb_output
               WHERE bname EQ tb_output-user_id.
        IF NOT tb_usr21[] IS INITIAL.
          SELECT persnumber
                 name_first
                 name_last
                 FROM adrp INTO TABLE tb_adrp
                 FOR ALL ENTRIES IN tb_usr21
                 WHERE persnumber EQ tb_usr21-persnumber.
        ENDIF.
      ENDIF.
      LOOP AT tb_usr21 INTO wa_usr21.
        READ TABLE tb_adrp INTO wa_adrp WITH KEY persnumber = wa_usr21-persnumber.
        IF sy-subrc EQ 0.
          wa_usr21-name_first = wa_adrp-name_first.
          wa_usr21-name_last = wa_adrp-name_last.
          CLEAR wa_adrp.
          MODIFY tb_usr21 FROM wa_usr21 TRANSPORTING name_first name_last.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " get_data_from_USR21_ADRP
    *&      Form  build_fieldcatlog
          It is used to build the fieldcatlog
    FORM build_fieldcatlog .
      wa_fieldcat-col_pos = 1.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'USER_ID'.
      wa_fieldcat-seltext_l = 'Requestor ID'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 2.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'USER_ID_NAME'.
      wa_fieldcat-seltext_l = 'Requestor Name'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 3.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'SAPLEGCUSTNO'.
      wa_fieldcat-seltext_l = 'SAP & Legacy Customer No'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 4.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'CUSTOMER_NAME'.
      wa_fieldcat-seltext_m = 'Customer Name'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 5.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'STRAS'.
      wa_fieldcat-seltext_m = 'Street Address'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 6.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'ORT01'.
      wa_fieldcat-seltext_m = 'City'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 7.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'REGIO'.
      wa_fieldcat-seltext_m = 'State'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 8.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'PSTLZ'.
      wa_fieldcat-seltext_m = 'Postal Code'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 9.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'LAND1'.
      wa_fieldcat-seltext_m = 'Country Code'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 10.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'PO_BOX'.
      wa_fieldcat-seltext_m = 'PO BOX NO'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 11.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'TRIL_PO_POSTAL'.
      wa_fieldcat-seltext_m = 'PO Box Postal Code'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 12.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'REASON_TYPE'.
      wa_fieldcat-seltext_m = 'Reason Type'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 13.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'REASON_CODE'.
      wa_fieldcat-seltext_m = 'Reason Code'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 14.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'REASON_DESC'.
      wa_fieldcat-seltext_m = 'Reason Description'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 15.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'PERC_PROB'.
      wa_fieldcat-seltext_m = 'TOP %'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = 16.
      wa_fieldcat-tabname = 'TB_FILL_DATA'.
      wa_fieldcat-fieldname = 'PATTERN_NUMBER'.
      wa_fieldcat-seltext_m = 'Match Pattern'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      wa_fieldcat-datatype = 'N'.
      APPEND wa_fieldcat TO tb_fieldcat.
      CLEAR wa_fieldcat.
    ENDFORM.                    " build_fieldcatlog
    *&      Form  event_call
         It is used to call the events
    FORM event_call .
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type     = 0
        IMPORTING
          et_events       = tb_events
        EXCEPTIONS
          list_type_wrong = 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.                    " event_call
    *&      Form  grid_display
          To display the output in ALV Grid  format
    FORM grid_display .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
           i_callback_program                = tb_repid
          i_callback_pf_status_set          = 'SET_PF_STATUS'
           i_callback_user_command           = 'USER_COMMAND'
           i_callback_top_of_page            = 'TOP_OF_PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
           is_layout                         = wb_layout
           it_fieldcat                       = tb_fieldcat[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
       I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
           it_events                         = tb_events
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
         TABLES
          t_outtab                          = tb_output
          t_outtab                          = tb_fill_output
        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.                    " grid_display
    *&      Form  top_of_page
          It is used to display the Top-of-page
    FORM top_of_page .
      CLEAR: wa_line, tb_list_header[].
      wa_line-typ = 'H'.
      wa_line-info = 'Duplicates Ignored by Requestor Report'.
      APPEND wa_line TO tb_list_header.
      CLEAR wa_line.
      wa_line-typ = 'S'.
      WRITE p_frmdat TO g_date1 DD/MM/YY.
      WRITE p_to_dat TO g_date2 DD/MM/YY.
      CONCATENATE 'From Date : ' g_date1  '        To Date : ' g_date2
                    INTO g_date3 SEPARATED BY  space .
      wa_line-info = g_date3.
      APPEND wa_line TO tb_list_header.
      CLEAR wa_line.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = tb_list_header.
       i_logo                   =
       I_END_OF_LIST_GRID       =
    ENDFORM.                    " top_of_page
    *&      Form  layout
       It is used to display the output layout
    FORM layout  USING    p_tb_layout.
      tb_layout-detail_popup      = 'X'.
      tb_layout-colwidth_optimize = 'X'.
    ENDFORM.                    " layout
    *&      Form  refresh_tables
    TO Refresh the internal table workarea
    FORM refresh_tables .
      REFRESH: tb_output, tb_reasoncodes, tb_zsdcustxref, tb_usr21, tb_fill_output.
      CLEAR: wa_output, wa_reasoncodes, wa_zsdcustxref, wa_usr21, wa_fill_output.
    ENDFORM.                    " refresh_tables
    *&      Form  SET_PF_STATUS
    It is used to populate the PF_STATUS
    FORM set_pf_status USING tb_extab TYPE slis_t_extab.
      SET PF-STATUS 'ZSTANDARD'.
    ENDFORM.                    " SET_PF_STATUS
    *&      Form  USER_COMMAND
    To avoid the shortdump of ALV Report
    FORM user_command USING rf_ucomm    LIKE sy-ucomm
                            rs_selfield TYPE slis_selfield.
    ENDFORM.                              "user_command
    *&      Form  check_reasoncode
          Checking Reason Code
    FORM check_reasoncode .
      IF NOT s_r_type IS INITIAL.
        SELECT SINGLE reason_code FROM zreasoncodes INTO s_r_code
                                  WHERE reason_type IN s_r_type
                                  AND reason_code IN s_r_code.
        IF sy-subrc NE 0.
          SET CURSOR FIELD 'S_R_CODE-LOW'.
          MESSAGE e204(zsd).
        ELSEIF s_r_code = 'TP'.
          MESSAGE e208(zsd).
        ENDIF.
      ENDIF.
    ENDFORM.                    " check_reasoncode
    *&      Form  check_reasontype
       Checking Reason Type
    FORM check_reasontype .
      IF s_r_type-low = 'TP' OR
           s_r_type-high = 'TP'.
        MESSAGE e208(zsd).
      ENDIF.
      SELECT SINGLE reason_type FROM zreasoncodes INTO s_r_type
                                 WHERE reason_type IN s_r_type.
      IF sy-subrc NE 0.
        MESSAGE e201(zsd).
      ENDIF.
    ENDFORM.                    " check_reasontype
    *&      Form  checking_From_date
          Checking From Date
    FORM checking_from_date .
      SELECT SINGLE
              curr_date
              FROM ztril_logtable
              INTO ztril_logtable-curr_date
              WHERE curr_date EQ  p_frmdat.
      IF sy-subrc NE 0.
        MESSAGE e205(zsd).
      ENDIF.
    ENDFORM.                    " checking_From_date
    *&      Form  checking_To_date
      Checking To_date
    FORM checking_to_date .
      SELECT SINGLE
               curr_date
               FROM ztril_logtable
               INTO ztril_logtable-curr_date
               WHERE curr_date EQ  p_to_dat.
      IF sy-subrc NE 0.
        MESSAGE e206(zsd).
    elseif p_frmdat lt p_to_dat.
       Message e209(zsd).
      ELSEIF p_frmdat GT p_to_dat.
        MESSAGE e207(zsd).
      ENDIF.
    ENDFORM.                    " checking_To_date
    *&      Form  checking_user_id
          text
    FORM checking_user_id .
      SELECT SINGLE user_id
               FROM ztril_logtable
               INTO s_userid
               WHERE user_id IN s_userid.
      IF sy-subrc NE 0.
        MESSAGE e200(zsd).
      ENDIF.
    ENDFORM.                    " checking_user_id
    *&      Form  output_data
      To print the Legacy customer No and SAP no into two different rows.*
    FORM output_data .
      LOOP AT tb_output INTO wa_output.
        wa_fill_output-user_id = wa_output-user_id.
        wa_fill_output-role = wa_output-role.
        wa_fill_output-saplegcustno = wa_output-kunnr.
        wa_fill_output-user_id_name = wa_output-user_id_name.
        wa_fill_output-customer_name = wa_output-customer_name.
        wa_fill_output-stras = wa_output-stras.
        wa_fill_output-ort01 = wa_output-ort01.
        wa_fill_output-regio = wa_output-regio.
        wa_fill_output-pstlz = wa_output-pstlz.
        wa_fill_output-land1 = wa_output-land1.
        wa_fill_output-po_box = wa_output-po_box.
        wa_fill_output-tril_po_postal = wa_output-tril_po_postal.
        wa_fill_output-tril_err_msg = wa_output-tril_err_msg.
        wa_fill_output-reason_type = wa_output-reason_type.
        wa_fill_output-reason_code = wa_output-reason_code.
        wa_fill_output-country_code = wa_output-country_code.
        wa_fill_output-reason_desc = wa_output-reason_desc.
        wa_fill_output-pattern_number =  wa_output-pattern_number.
        wa_fill_output-perc_prob = wa_output-perc_prob.
        CLEAR:  wa_output-user_id,
                wa_output-role,
                wa_output-kunnr,
                wa_output-user_id_name,
                wa_output-stras,
                wa_output-ort01,
                wa_output-regio,
                wa_output-pstlz,
                wa_output-land1,
                wa_output-po_box,
                wa_output-tril_po_postal,
                wa_output-tril_err_msg,
                wa_output-reason_type,
                wa_output-reason_code,
                wa_output-country_code,
                wa_output-reason_desc,
                wa_output-customer_name,
                wa_output-pattern_number,
                wa_output-perc_prob.
        APPEND wa_fill_output TO tb_fill_output.
        IF NOT wa_output-saplegcustno1 IS INITIAL.
          CLEAR:  wa_fill_output-user_id,
                  wa_fill_output-role,
                  wa_fill_output-kunnr,
                  wa_fill_output-user_id_name,
                  wa_fill_output-stras,
                  wa_fill_output-ort01,
                  wa_fill_output-regio,
                  wa_fill_output-pstlz,
                  wa_fill_output-land1,
                  wa_fill_output-po_box,
                  wa_fill_output-tril_po_postal,
                  wa_fill_output-tril_err_msg,
                  wa_fill_output-reason_type,
                  wa_fill_output-reason_code,
                  wa_fill_output-country_code,
                  wa_fill_output-reason_desc,
                  wa_fill_output-customer_name,
                  wa_fill_output-pattern_number,
                  wa_fill_output-perc_prob.
          wa_fill_output-saplegcustno = wa_output-saplegcustno1.
          APPEND wa_fill_output TO tb_fill_output.
          CLEAR: wa_output.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " output_data

  • VERY URGENT - Adobe forms with email problems

    I THERE - I AM A ADOBE FORMCENTRAL CLIENT I HAVE MY PAYEMENTS ON DAY BUT FOR SOME REASON THE ADOBE STOP RESENDING TO MY EMAUIL ACOUNT AND TO MY CLIENTS  EMAIL ACCOUNT THE SUMARY OF THE FORM THAT IS SUBMITED. THIS IS VERY URGENT THAT BE FIXED FROM YOU SIDE PLS LET ME KNOW WHAT IS HAPENING.
    PLS FIX THIS URGENT AS I HAVE MY CLIENTS SCREEMING ON ME
    PLS ANSWER TO
    [email protected]

    Now is working
    after 2 hours is working now. but this have never hapen before. now I am
    woried with this ADOBE FORM system!!!! it can hapen and I never know.
    br
    henrique
    2014-04-25 21:29 GMT+01:00 Josh_Corey <[email protected]>:
        Re: VERY URGENT - Adobe forms with email problems
    created by Josh_Corey <http://forums.adobe.com/people/Josh_Corey> in
    FormsCentral - View the full discussion<http://forums.adobe.com/message/6331228#6331228

  • How to write code for this logic in a routine, very urgent --help me

    hi all,
    i want to apply this logic into one subroutin ZABC.
    here i m giving my logic ,can any body help me in coding for this, this is very urgent, i hv to submit on wednesday.
    4.1 Read the company code number BSEG-BUKRS from document line item.
    4.2 Fetch PRDHA from MARA into GV_PRDHA where MATNR = BSEG-MATNR.
    4.3 Fetch Business area (GSBER) from ZFIBU into GV_GSBER where (PRDHA = GV_PRDHA and BUKRS = BSEG-BUKRS) OR (PRDHA = GV_PRDHA and BUKRS = SPACE).
    4.4 If business area match is found, go to step 3.9. Else continue.
    4.5 If BKPF-BLART IN set “ZVS_POSDT” OR BKPF-XBLNR starts with “I0*”, execute steps below. Else, go to Step 3.6.
    i. MOVE: BSEG-BKURS TO work area field WA_ZFIBUE-BUKRS,
    BSEG-MATNR TO work area field WA_ZFIBUE-MATNR,
    GV_PRDHA TO work area field WA_ZFIBUE-PRDHA,
    BSEG-HKONT TO work area field WA_ZFIBUE-HKONT,
    BSEG-GSBER TO work area field WA_ZFIBUE-GSBER,
    BSEG-PSWBT TO work area field WA_ZFIBUE-PSWBT,
    BKPF-BUDAT TO work area field WA_ZFIBUE-BUDAT,
    SY-DATUM TO work area field WA_ZFIBUE-CREDATE,
    SY-UZEIT TO work area field WA_ZFIBUE-CRETIME,
    Fetch running serial number (WA_ZFIBUE-SERIALNO) from ZFICO. This number will be stored in ZFICO with PARAMTYPE = "BPM030307", SUBTYPE = "ZFIBUE" and KEY1 = "SERIALNO". The actual serial number will be stored in the field VALUE1.
    i. Insert WA_ZFIBUE INTO ZFIBUE.
    ii. Send email notification to the user (if it is not already sent to user on the same posting date).
    Use function module ‘SO_NEW_DOCUMENT_ATT_SEND_API1’ to send mail.
    Fetch email address and date of last email from ZFICO. These values will be stored in ZFICO with PARAMTYPE = "BPM030307", SUBTYPE = "EMAIL" and KEY1 = "<USERNAME>". The email address will be stored in the field VALUE1 and posting date in VALUE2. Once mail is sent, VALUE2 is updated with latest posting date (BKPF-BUDAT).
    iii. Increment the running serial number and update ZFICO with new serial number.
    a. GV_ SERIALNO = WA_ZFIBUE-SERIALNO + 1
    b. Update ZFICO Set value1 = GV_SERIALNO
    Where PARAMTYPE = "BPM030307" AND
    SUBTYPE = "ZFIBUE" AND
    KEY1 = "SERIALNO".
    iv Move “VDFT” to BSEG-GSBER.
    v. Exit routine.
    4.6 Fetch MTART into GV_MTART from MARA where MATNR = BSEG-MATNR.
    4.7 If SY-BATCH = INITIAL AND GV_MTART <> ‘ROH’, issue the error message - “Maintain the mapping of product hierarchy <PRDHA> from article <MATNR> for <BUKRS>”. Else, go to step 3.8.
    4.8 If SY-BATCH <> INITIAL AND GV_MTART <> ‘ROH’, issue the error message - “Maintain product hierarchy on article master”. Go to step 3.10.
    4.9 Move GV_GSBER TO BSEG-GSBER.
    4.10 Exit Routine
    plz give me reply asap --this is very urgent
    thanks in advance
    swathi

    Hi Swathi,
    If it's very very urgent then you better get on with it, don't waste time on the web. Chop chop.

  • Open items for purchase order its very urgent

    hi
    my requirement is to write extract program for purchase order(me21) to extract only open items.
    please provide sample code its very urgent.
    thanks in advance.
    points will be rewarded.
    thanks
    hari prasad reddy

    check the below report :
    REPORT ZMM_OPEN_PO_REPORT no standard page heading
                              line-size 255
                              message-id zwave.
    ======================================================================
    Program Name : ZMM_OPEN_PO_REPORT                                    *
    Description  : This report displays all Open PO Items and output     *
                   would be PO Number,Material number and so on          *
    Author       : Seshu                                                 *
    Date         : 01/24/2007                                            *
    MODIFICATION HISTORY                                                 *
    DATE    | AUTHOR   | CHANGE #   | DESCRIPTION OF MODIFICATION        *
    --|||--
    01/24/07| Seshu    | DEVK921979 | Initial                            *
    D A T A  D E C L A R A T I O N   P A R T                         ***
    type-pools
    type-pools : slis.
    Tables
    tables : ekko, " Purchase order Header
             ekpo, " Purchase order Item
             marc. " Material with Plant data
    Internal table for output.
    data : begin of i_output occurs 0,
           ebeln like ekko-ebeln,
           matnr like ekpo-matnr,
           end of i_output.
    ALV Data declaration.
    data : v_repid like sy-repid.
      ALV Function Module Variables
    DATA: gs_layout type slis_layout_alv,
          g_exit_caused_by_caller,
          gs_exit_caused_by_user type slis_exit_by_user.
    DATA: gt_fieldcat    type slis_t_fieldcat_alv,
          gs_print       type slis_print_alv,
          gt_events      type slis_t_event,
          gt_list_top_of_page type slis_t_listheader,
          g_status_set   type slis_formname value 'PF_STATUS_SET',
          g_user_command type slis_formname value 'USER_COMMAND',
          g_top_of_page  type slis_formname value 'TOP_OF_PAGE',
          g_top_of_list  type slis_formname value 'TOP_OF_LIST',
          g_end_of_list  type slis_formname value 'END_OF_LIST',
          g_variant LIKE disvariant,
          g_save(1) TYPE c,
          g_tabname_header TYPE slis_tabname,
          g_tabname_item   TYPE slis_tabname,
          g_exit(1) TYPE c,
          gx_variant LIKE disvariant.
    data : gr_layout_bck type slis_layout_alv.
    Ranges
    ranges r_eindt for eket-eindt.
    initialization.
    v_repid = sy-repid.
    start-of-selection.
    Get the data from EKKO ,EKPO and MARC Table
    perform get_data_tables.
    end-of-selection.
    display the data in the form of ALV
    perform display_data.
    *&      Form  get_data_tables
          Get the data from EKKO,EKPO and MARC Table
    FORM get_data_tables.
    clear : i_output.
    refresh : i_output.
    fill the dates in ranges
    r_eindt-low = sy-datum - 7.
    r_eindt-high = sy-datum + 14.
    r_eindt-option = 'BT'.
    r_eindt-sign = 'I'.
    append r_eindt.
    Get the data from EKKO,EKPO and EKET Tables
    select aebeln bmatnr into table i_output
                           from ekko as a inner join
                                ekpo as b on aebeln = bebeln
                                inner join marc as c on cmatnr = bmatnr
                                inner join mara as d on dmatnr = bmatnr
                                inner join eket as e on eebeln = aebeln
                                               and   eebelp = bebelp
                                where c~beskz = 'E'
                                and   c~werks = '1000'
                                and   d~mtart = 'FERT'
                                and   b~loekz = space
                                and   b~elikz = space
                                and   e~eindt in r_eindt.
    if sy-subrc ne 0.
    message e000(zwave) with 'No open purchase order found'.
    endif.
    ENDFORM.                    " get_data_tables
    *&      Form  display_data
          text
    FORM display_data.
    Fill the Fiedlcat
      PERFORM fieldcat_init  using gt_fieldcat[].
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
       I_INTERFACE_CHECK                 = ' '
       I_BYPASSING_BUFFER                =
       I_BUFFER_ACTIVE                   = ' '
         I_CALLBACK_PROGRAM                = v_repid
       I_CALLBACK_PF_STATUS_SET          = ' '
        I_CALLBACK_USER_COMMAND           = g_user_command
       I_CALLBACK_TOP_OF_PAGE            = ' '
       I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
       I_CALLBACK_HTML_END_OF_LIST       = ' '
       I_STRUCTURE_NAME                  =
       I_BACKGROUND_ID                   = ' '
       I_GRID_TITLE                      =
       I_GRID_SETTINGS                   =
       IS_LAYOUT                         = gr_layout_bck
          IT_FIELDCAT                       = gt_fieldcat[]
       IT_EXCLUDING                      =
       IT_SPECIAL_GROUPS                 =
       IT_SORT                           =
       IT_FILTER                         =
       IS_SEL_HIDE                       =
       I_DEFAULT                         = 'X'
        I_SAVE                            = g_save
        IS_VARIANT                        =
       IT_EVENTS                         =
       IT_EVENT_EXIT                     =
       IS_PRINT                          =
       IS_REPREP_ID                      =
       I_SCREEN_START_COLUMN             = 0
       I_SCREEN_START_LINE               = 0
       I_SCREEN_END_COLUMN               = 0
       I_SCREEN_END_LINE                 = 0
       IT_ALV_GRAPHICS                   =
       IT_ADD_FIELDCAT                   =
       IT_HYPERLINK                      =
       I_HTML_HEIGHT_TOP                 =
       I_HTML_HEIGHT_END                 =
       IT_EXCEPT_QINFO                   =
    IMPORTING
       E_EXIT_CAUSED_BY_CALLER           =
       ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = i_output
       EXCEPTIONS
         PROGRAM_ERROR                     = 1
         OTHERS                            = 2
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " display_data
    *&      Form  fieldcat_init
          text
         -->P_GT_FIELDCAT[]  text
    FORM fieldcat_init USING  e01_lt_fieldcat type slis_t_fieldcat_alv.
      DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    Purchase order number
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'EBELN'.
      LS_FIELDCAT-ref_fieldname = 'EBELN'.
      LS_FIELDCAT-ref_tabname = 'EKKO'.
      LS_FIELDCAT-TABNAME    = 'I_OUTPUT'.
      ls_fieldcat-seltext_L = 'Purchase Order'.
      ls_fieldcat-seltext_M = 'Purchase Order'.
      ls_fieldcat-seltext_S = 'Purchase Order'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Material #
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MATNR'.
      LS_FIELDCAT-ref_fieldname = 'MATNR'.
      LS_FIELDCAT-ref_tabname = 'EKPO'.
      LS_FIELDCAT-TABNAME    = 'I_OUTPUT'.
      ls_fieldcat-seltext_L = 'Material'.
      ls_fieldcat-seltext_M = 'Material'.
      ls_fieldcat-seltext_S = 'Material'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    ENDFORM.                    " fieldcat_init

  • Communication b/w SAP and VB .exe file - Very urgent.

    hi,
      I am currently in a project implementing SAP for a cement manufacturing company. Here we have a VB .exe file which takes parameters and return values. now we need to connect this to application to SAP R/3 to pass data to that application and access the data from that .exe file.
    Note: we don't have any source code for that vb .exe file its a third party software.
    Its an very urgent one....
    please guide me how to do it with all steps.
    Any material please pass to [email protected]
    Thanks in advance.

    form grosswt .
      refresh itab3.
      clear itab3.
       Executing VB EXE file to get the weight from weigh bridge
      call function 'WS_EXECUTE'
       exporting
          DOCUMENT                 = ' '
          CD                       = ' '
          COMMANDLINE              = ' '
         inform                   = 'X'
           cd      = 'C:\SAPWEI'
         program                  = 'C:\sapwei\MyVB.exe'
          STAT                     = ' '
          WINID                    = ' '
          OSMAC_SCRIPT             = ' '
          OSMAC_CREATOR            = ' '
          WIN16_EXT                = ' '
          EXEC_RC                  = ' '
        IMPORTING
          RBUFF                    =
        EXCEPTIONS
          FRONTEND_ERROR           = 1
          NO_BATCH                 = 2
          PROG_NOT_FOUND           = 3
          ILLEGAL_OPTION           = 4
          GUI_REFUSE_EXECUTE       = 5
          OTHERS                   = 6
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
       Fetching Value from VB text file
      call function 'WS_UPLOAD'
       exporting
        CODEPAGE                      = ' '
         filename                      = 'C:\sapwei\w1.txt'
        FILETYPE                      = 'ASC'
        HEADLEN                       = ' '
        LINE_EXIT                     = ' '
        TRUNCLEN                      = ' '
        USER_FORM                     = ' '
        USER_PROG                     = ' '
        DAT_D_FORMAT                  = ' '
      IMPORTING
        FILELENGTH                    =
        tables
          data_tab                      = itab3
      EXCEPTIONS
        CONVERSION_ERROR              = 1
        FILE_OPEN_ERROR               = 2
        FILE_READ_ERROR               = 3
        INVALID_TYPE                  = 4
        NO_BATCH                      = 5
        UNKNOWN_ERROR                 = 6
        INVALID_TABLE_WIDTH           = 7
        GUI_REFUSE_FILETRANSFER       = 8
        CUSTOMER_ERROR                = 9
        NO_AUTHORITY                  = 10
        OTHERS                        = 11
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
      loop at itab3.
        v1 = itab3-num.
        pgrwt = v1.
      endloop.
      message 'Save Gross Weight' type 'S'.
    endform.                    " grosswt

  • Excise Duty Value in Export Invoice - Very Urgent

    Hi Gurus,
    I have created a Export delivery & Billing Documents. I am trying to create Excise Invoice in which Excise Duty values are coming as "0". We are using TAXINN Procedure ,  ECC 6.0
    Is there any specific note or any customization required for this ?
    Due to this ARE1 is also giving "0" values & subsequent "0" value in Bond Register.
    Can anybody help me on this ?  It is very urgent.
    Thanks in advance
    Vikas

    Hi Vikas,
    Could you help yaar ...if you got solution for it ..I am facing  same problem..We are going  live very soon,
    help of ur's could help me lot  ..My mail id [email protected]
    Thanks in advanec in for your help.
    regards,
    Vijay Khochare

  • How to write code for this logic, plz help me very urgent

    Hi All,
    i am new to sap-abap, i got this work and i m working on this can any body help me in writing code, plz help me, this is very very urgent.
    here  i m giving my logic, can anybody send me the code related to this logic.
    this is very urgent .
    this program o/p should be in ALV format and need to create one commond 'SAVE" on this o/t list  if  user clicks save processedon and processedby fields in ZFIBUE should be updated automatically.
    i am creating one custom table zfibue having fields: (serialno, bukrs, matnr,prdha,hkont,gsber,wrbtr,budat, credate, cretime,processed, processedon, processedby,mapped)
    fields of zfibue:
    serailno = numc
    bukrs = char
    matnr = char
    prdha = char
    hkont = char
    gsber = char
    wrbtr = char
    budat = date
    credate = date
    cretime = time
    processed= char
    processedon = date
    processedby = char
    mapped = char      are   belongs to above type data types
    and seelct-optionfields:  s_bukrs for bseg-bukrs
                                        s_hkont for bseg-hkont,
                                         s_budat for bkpf-budat,
                                         s_processed for zfibue-processed,
                                          s_processedon for zfibue-processedon,
                                          s_mapped. for zfibue-mapped
    parameters: p_chk1 as checkbox,
                      p_chk2 as checkbox.
                      p_filepath type rlgrap-filename.
    1.1 Validate the user inputs (S_BUKRS and S_HKONT) against respective check tables (T001 and SKB1). If the validation fails, provide respective error message. Eg: “Invalid input for Company Code”.
    1.2 Fetch SERIALNO, BUKRS, MATNR, PRDHA, HKONT, GSBER, WRBTR, BUDAT, CREDATE, CRETIME, PROCESSED, PROCESSEDON, PROCESSEDBY, MAPPED from table ZFIBUE into internal table GT_ZFIBUE where BUKRS IN S_BUKRS, HKONT IN S_HKONT, BUDAT IN S_BUDAT, PROCESSED IN S_PROCESSED, PROCESSEDON IN S_PROCESSEDON, and MAPPED IN S_MAPPED.
    1.3 If P_CHK2 = ‘X’, go to step 1.11. Else continue.
    1.4 If P_CHK1 = ‘X’, continue. Else go to step 1.9
    1.5 Fetch MATNR, PRDHA from MARA into GT_MARA for all entries in GT_ZFIBUE where MATNR = GT_ZFIBUE-MATNR.
    1.6 Sort and delete adjacent duplicates from GT_MARA based on MATNR.
    1.7 Loop through GT_ZFIBUE where PRDHA = blank.
              Read Table GT_MARA based on MATNR = GT_ZFIBUE-MATNR.
              IF sy-subrc = 0.
                     Move GT_MARA-PRDHA to GT_ZFIBUE-PRDHA.
                  Modify Table GT_ZFIBUE. “Update Product Hierarchy
                 Endif.
        Fetch PRDHA, GSBER from ZFIBU into GT_ZFIBU for all entries in GT_ZFIBUE where PRDHA = GT_ZFIBUE-PRDHA.
        Read Table GT_ZFIBU based on PRDHA = GT_ZFIBUE-PRDHA.
              IF sy-subrc = 0.
                     Move GT_ZFIBU-GSBER to GT_ZFIBUE-GSBER.
                  Move “X” to GT_ZFIBUE-MAPPED.      
                  Modify Table GT_ZFIBUE.
                 Endif.   
    Endloop.
    1.8 Modify database table ZFIBUE from GT_ZFIBUE.
    1.9 Fill the field catalog table GT_FIELDCAT using the details of output fields listed in section “Inputs/Outputs” (above).
       Eg:                 LWA_ FIELDCAT -SELTEXT_L = 'Serial Number’.
                              LWA_ FIELDCAT -DATATYPE = ‘NUMC’.
                              LWA_ FIELDCAT -OUTPUTLEN = 9.
                              LWA_ FIELDCAT -TABNAME = 'GT_ZFIBUE'.
                              LWA_ FIELDCAT-FIELDNAME = 'SERIALNO'.
              Append LWA_FIELDCAT to GT_FIELDCAT
    Note: a) The output field GT_ZFIBUE-PROCESSED will be editable marking INPUT = “X” in field catalog (GT_FIELDCAT).
             b) The standard ALV functionality will be used to give the user option for selecting all or blocks of entries at a time.
             c) The PF-STATUS STANDARD_FULLSCREEN from function group SLVC_FULLSCREEN will be copied to the program and modified to include a “SAVE” button.
    1.10 Call the function module REUSE_ALV_GRID_DISPLAY passing output table GT_ZFIBUE and field catalog GT_FIELDCAT. Additional parameters like I_CALLBACK_PF_STATUS_SET (= ‘ZFIBUESTAT’) and I_CALLBACK_USER_COMMAND (=’HANDLE_USER_ACTION’) will also be passed to handle user events. Go to 2.14.
    1.11 Download the file to P_FILEPATH using function module GUI_DOWNLOAD passing GT_ZFIBUE.
    1.12 Exit Program.
    Logic to be implemented in  routine “Handle_User_Action”
    This routine will have the following interface:
    FORM Handle_User_Action  USING r_ucomm LIKE sy-ucomm
                                                               rs_selfield TYPE slis_selfield.
    ENDFORM.
    Following logic will be implemented in this routine:
    1.     If r_ucomm = ‘SAVE’, continue. Else exit.
    2.     Loop through GT_ZFIBUE where SEL_ROW = ‘X’. “Row is selected
    a.     IF GT_ZFIBUE-PROCESSED = ‘X’.
    i.     GT_ZFIBUE-PROCESSEDON = SY-DATUM.
    ii.     GT_ZFIBUE-PROCESSEDBY = SY-UNAME.
    iii.     MODIFY ZFIBUE FROM work area GT_ZFIBUE.
    Endif.
    Endloop.

    Hi Swathi,
    If it's very very urgent then you better get on with it, don't waste time on the web. Chop chop.

  • Very Urgent! Help!

    I have an eclipse application to open a new email message with an attachment (in the default mail client) clicking a button.
    Below are my codes:-
    Runtime.getRuntime().exec(new String[]{"cmd.exe","/c","start mailto:[email protected]?subject=MailTo&cc=[email protected]&attachment="e://myfile.txt"});
    The problem is that the file can't be attached.
    Appreciate suggestions and solutions.
    Pls reply asap as this application is very urgent
    Thanks.

    You should have simplified your problem by producing a valid Windows command before trying to Runtime.exec it. What you are doing there is testing with your eyes shut.
    If you had typed that string you thought was a Windows command, and fiddled with it a bit, you would have found out that the & character is treated as a delimiter that separates a list of commands by the Windows shell. You would have seen the error message that says
    'cc' is not recognized as an internal or external command, operable program or batch file.
    Sorry, I don't know what you can do about that. But it isn't a Java question.

  • VERY URGENT Help with istalling developer 9i

    i downloaded all the files from the web site and they are *.brk after i ran the *.bat file i created a *.exe file i tryed to run it and this an error that the file isn't vaild on win 32 application it's very urgent if you have any idea how to install please send me an email to [email protected]
    Thanks

    hi,
    do u want interctive report in classical report?

  • Very Urgent Help needed - Arabic support in  Forms6i& reports6i

    Hi,
    Its a very very very urgent requirement.
    How to Provide the arabic support in forms .
    I am working on Windows Xp operating system.
    1. How to Configure the Windows XP Operating system to provide arabic support?
    In Design time i want to use English and during runtime i should be able to toggle beteen English and Arabic for Entering the data.Arabic data should be captured in seperate fields.
    1. How to configure the oracle 8i/9i databases to provide both arabic(Saudi Arabia) and english? what characterset i need to
    choose for saudi arabic?
    2.How to install forms & Reports with arabic support?
    3.How to dispaly the data in both english and arabic in forms and reports during runtime?
    I will be really greatful if u are able to provide me that help and my advanced thanks to ur help.This very
    very urgent.
    Regds,
    B.Prasad
    [email protected]

    Badma,
    1. How to Configure the Windows XP Operating system to
    provide arabic support?Please go to "Regional and Language Options" from the Control Panel. In the "Standards and formats" group of the "Regional Opitons" tab, select "Arabic (Saudi Arabia)". In the "Language for non-Unicode programs" group of the "Advanced" tab, select "Arabic (Saudi Arabia)", then restart Windows. If "Arabic (Saudi Arabia)" is not listed, then please go to the "Langauges" tab and make sure the "Install files for complex script and right-to-left languages (including Thai)" in the "Supplemental language support" group is checked.
    1. How to configure the oracle 8i/9i databases to provide
    both arabic and english? what characterset i need to
    choose for saudi arabic?If you're not planning to support other languages than Arabic and English (7-bit), AR8MSWIN1256 should work for you. If you're planning to support other languages in the future, I would recommend you to create your database in UTF8 (Forms/Reports 6i doesn't work with AL32UTF8 database). Please note Arabic characters are represented in 2 bytes in UTF8 while they are 1 byte in AR8MSWIN1256.
    2.How to install forms & Reports with arabic support?If you need Arabic translation, then please select Arabic when you're asked the language(s) to install. Otherwise, notmal Forms/Reports installation should work for you.
    3.How to dispaly the data in both english and arabic in
    forms and reports?Set your NLS_LANG to ARABIC_SAUDI ARABIA.AR8MSWIN1256.
    Hope this helps.
    Regards,
    - Makoto

  • How to send Zip files as attachments !! Very urgent, Please help!

    I am sending PDF files as attachments using java mail (it works fine). But now my requirement is to zip the PDFs and send them as attachments instead of actual PDF's. But i don't know how to achieve that. does java mail API support zip attachment facilities? I have looked in activation API also, but i couldn't find anything helpful. even i searched the forums, but no clue. Please, anybody help me about this, it's very urgent.
    thanks
    sri

    Check the first "if". If I specify an attachment, then a myme multipart doby is created: one for text and the other for the attachemnt I use this myme ovbject only for attachemnts, because some ISPs have problems and report error in email format if the attachemnet is missing and it contains only text and no attachment.
    static public void send(String to,
         String from,
         String host,
         String smtpPort,
         String subject,
         String body,
         String fileAttachment,
         String attachmentMimeType,
         String username,
         String password,
         String debug)
    throws Exception
         // create some properties and get the default Session
         Properties props = new Properties();
         props.put("mail.smtp.host", host);
         props.put("mail.smtp.port", smtpPort);
         props.put("mail.smtp.timeout","5000");
         props.put("mail.debug", debug);
         Session session = null;
         if (username != null && password != null)
              props.put("mail.smtp.auth", "true");
              MyPasswordAuthenticator auth = new MyPasswordAuthenticator(username, password);
              session = Session.getDefaultInstance(props,auth);
         else
              session = Session.getDefaultInstance(props, null);
         //session.setDebug(true);
         // create a message
         MimeMessage message = new MimeMessage(session);
         message.setFrom(new InternetAddress(from));
         InternetAddress[] address = InternetAddress.parse(to, false);
         message.setRecipients(Message.RecipientType.TO, address);
         message.setSubject(subject);
         message.setSentDate(new Date());
         // create the message part
         if ( fileAttachment != null && fileAttachment != "NO" )
              MimeBodyPart messageBodyPart = new MimeBodyPart();
              //fill message
              messageBodyPart.setText(body);
              //Multipart multipart = new MimeMultipart();
              Multipart multipart = new MimeMultipart("alternative");
              multipart.addBodyPart(messageBodyPart);
              // Part two is attachment
              System.out.println("----->fileAttachment DISTINTO de NULL");
              messageBodyPart = new MimeBodyPart();
              FileDataSource fds = new FileDataSource(fileAttachment);
              messageBodyPart.setDataHandler( new DataHandler(fds));
              messageBodyPart.setFileName(fileAttachment); //<-- El archivo atachado.
              multipart.addBodyPart(messageBodyPart);
              //EN DESARROLLO el envio de attachment!!          
              // Put parts in message
              message.setContent(multipart);
         } else { //Envio es solamente TEXTO
              message.setText(body);
         // send the message
         Transport.send(message);
    Regards,
    Vladimir

  • RE: (forte-users) Hi All....very urgent...Forte doesn'thandle La rge ar

    Okay, here's my three cents worth,
    Are you using Forte "Keep Alive" settings? If yes, you may simply have a
    time-out.
    While a partition is waiting for a reply from a database, it blocks and
    won't respond
    to anything, including pings to check if it's still alive. So, if the query
    takes longer to
    complete than the time-out period of the communication manager, then you
    will
    loose the connection to the partition.
    -----Original Message-----
    From: Aberdour George [SMTP:george.aberdourdet.nsw.edu.au]
    Sent: Sunday, February 13, 2000 11:39 AM
    To: 'Babu Raj'; kamranaminyahoo.com
    Subject: RE: (forte-users) Hi All....very urgent...Forte doesn't
    handle La rge array properly
    Hi,
    This sounds almost identical to a problem we have experienced.
    If it is the same problem it is because you have compiled a back-end
    load-balanced partition, but NOT the router that manages it.
    With such a configuration, attempts to send greater than a few thousand
    rows
    will fail - and it doesn't seem to matter what you set -fm to.
    You don't see the problem running distributed from your workspace because
    everything is interpreted.
    So just compile the router and try again.
    Hope this helps.
    George Aberdour
    (George.Aberdourdet.nsw.edu.au)
    -----Original Message-----
    From: Babu Raj [mailto:ibcsmartboyyahoo.com]
    Sent: Saturday, 12 February 2000 7:24
    To: kamranaminyahoo.com
    Subject: (forte-users) Hi All....very urgent...Forte doesn't handle
    Large array properly
    Hi All,
    Have anyone experienced problem of retrieving
    more than 1500 records from the database table, into
    the object.
    I use dynamic SQL statement, and populating Array
    object from the DBDataSet. When it runs from my
    workspace distributed, it works fine. But, when I make
    deployment, and install on the test bed, I face
    Network connection failure from the client machine. It
    looks like, server read the data from the Database,
    and while packaging it, to send it across to the
    client, server seems to run out ouf memory or couldn't
    maintain the connection with the client. I tried to
    set -fm flag on that partition, and separately setting
    FORTE_GC_SPECIAL too, but still no luck.
    we have increased, the rollback segment size on
    Oracle too, but still no luck.
    Appreciate, your suggestions, if you can,
    Thank you,
    Babu
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

    Okay, here's my three cents worth,
    Are you using Forte "Keep Alive" settings? If yes, you may simply have a
    time-out.
    While a partition is waiting for a reply from a database, it blocks and
    won't respond
    to anything, including pings to check if it's still alive. So, if the query
    takes longer to
    complete than the time-out period of the communication manager, then you
    will
    loose the connection to the partition.
    -----Original Message-----
    From: Aberdour George [SMTP:george.aberdourdet.nsw.edu.au]
    Sent: Sunday, February 13, 2000 11:39 AM
    To: 'Babu Raj'; kamranaminyahoo.com
    Subject: RE: (forte-users) Hi All....very urgent...Forte doesn't
    handle La rge array properly
    Hi,
    This sounds almost identical to a problem we have experienced.
    If it is the same problem it is because you have compiled a back-end
    load-balanced partition, but NOT the router that manages it.
    With such a configuration, attempts to send greater than a few thousand
    rows
    will fail - and it doesn't seem to matter what you set -fm to.
    You don't see the problem running distributed from your workspace because
    everything is interpreted.
    So just compile the router and try again.
    Hope this helps.
    George Aberdour
    (George.Aberdourdet.nsw.edu.au)
    -----Original Message-----
    From: Babu Raj [mailto:ibcsmartboyyahoo.com]
    Sent: Saturday, 12 February 2000 7:24
    To: kamranaminyahoo.com
    Subject: (forte-users) Hi All....very urgent...Forte doesn't handle
    Large array properly
    Hi All,
    Have anyone experienced problem of retrieving
    more than 1500 records from the database table, into
    the object.
    I use dynamic SQL statement, and populating Array
    object from the DBDataSet. When it runs from my
    workspace distributed, it works fine. But, when I make
    deployment, and install on the test bed, I face
    Network connection failure from the client machine. It
    looks like, server read the data from the Database,
    and while packaging it, to send it across to the
    client, server seems to run out ouf memory or couldn't
    maintain the connection with the client. I tried to
    set -fm flag on that partition, and separately setting
    FORTE_GC_SPECIAL too, but still no luck.
    we have increased, the rollback segment size on
    Oracle too, but still no luck.
    Appreciate, your suggestions, if you can,
    Thank you,
    Babu
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

Maybe you are looking for

  • Query regarding Metadata load in Essbase using rule file

    Hi In our application,we are  loading metadata using Essbase rule file and  here we are facing one problem.Suppose we have to load a level 0 member called "xxxx" under two different parent,assume the parent members are Parent_AAAA and Parent_BBBB.But

  • Music and your devices

    I upgraded my phone to the newest iPhone (4s) and can't get all of my music on it (or my iPad for that matter). It says that some of the musice is already on 5 devices. Seeing that this is my 3rd iPhone, my music has been on the 1st two, my computer

  • Transaction Variant for XD02

    Hi All, I have been exploring how to create/use a transaction variant for transaction code XD02. I have already done the first part of my requirement, which is to disable the screen fields of other General Data of XD02. Now, can I limit the access of

  • Unable to connect or discover 8610 all-in-one / MAC & Win 7 64 bit

    My 8610 all-in-one previous has been working fine as a wireless network printer for both my MAC OS 10 and laptop Win 7 64 bit.     Suddenly the 8610 will not print from either device.   I downloaded and installed the latest drivers for both from HP.

  • Need to re-contact 'Tampa' chat room host

    Please fwd a contact email address so that I can fwd iSoft order info and order/purchase confirmation of CS6 software. December 2012. Thank you. Richard Peel 12 High Croft Ckaverdon Warwick CV35 8LH Tel 01926-842876 email: [email protected]