GUI_Download funtion module problem

HI All,
I am Using GUI_Download funtion module for downloading data from internal table to flat file. But one of the field is having the value ОАО "САН Интербрю Украина"
After downloading data, the letters are being replaced by # in the download.
If any one know please let me as early as possible.
Thanks in advance.....
Satish

Check the sap documentation for the funtion module(Especially for CODE page)
Character Representation for Output                                                                               
Description                                                                               
Use parameter CODEPAGE to specify the desired target codepage. If this 
    parameter is not set, the codepage of the SAP GUI is used as the target
    codepage.                                                                               
Value range                                                                               
4-digit number of the SAP codepage. Function module                    
    SCP_CODEPAGE_BY_EXTERNAL_NAME returns the SAP codepage number for an   
    external character set name such as "iso-8859-1". Function module      
    NLS_GET_FRONTEND_CP returns the related non-Unicode frontend codepage  
    for a language.                                                                               
You can specify the desired codepage interactively, if the parameter   
    with_encoding of method file_save_dialog is set by                     
    cl_gui_frontend_services.                                                                               
SPACE: Codepage of the frontend operating system.                      
Regards,
Ravi

Similar Messages

  • Funtional modul problem...plz help me

    hai
    i call functional module for  get the date during the period(20060501-20060530 = 30 days)  but it comes short dump  " Incorrect parameter with CALL FUNCTION."
    if anybody tel me da resent please ?
    data: w_days type p.
    CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES'
    EXPORTING
    DATE1 = '20060530'
    DATE2 = '20060501'
    OUTPUT_FORMAT = '02'
    IMPORTING
    DAYS = W_DAYS
    EXCEPTIONS
    INVALID_DATES_SPECIFIED = 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.
    regard
    nawa

    check that the data types of the import and export parameters are same or not ??
    output formats are :
    01           Years with decimals
    04           Months with decimals
    07           Anniversary
    08           Anniversary months
    E1           Years with decimals
    E4           Months with decimals
    E7           Anniversary
    E8           Anniversary months
    check it...
    enter the dates in following format :
    DATE1                           20.07.2006
    DATE2                           20.06.2006
    OUTPUT_FORMAT                   01
    reward points if useful.....

  • GUI_DOWNLOAD fn module text allignment problem

    Hi
    I have a problem while downloading data from internal table to presentation server filepath using GUI_DOWNLOAD fn module.
    For me the requirement is to display each field data at a fixed location in a DAT file (notepad) for all lines irrespective of any delimiter.
    Now data of ech field is getting displayed continuously after its preceeding field with the specified delimiter. I want to fix the location of each field at a particular point for all lines in the file after download.
    Is there any other fn module for this or any change in the parameters for fixing the field positions in the output file ?
    Harsha

    Hi Vinod
    I have tried your way solution also. Still my problem is not solved.
    Present Output:
    test test     E12EDWQD     0000110.000
    venky kirupa test case- final se     87549-8655-9     0000110.000
    Vetri Velan     SAFETWT     0000961.540
    Amount fieilds(last field) of each line  need to be alligned one below the other starting from same position in all lines. At present its all random based on the length of previous field.
    Harsha.

  • Why again funtion modules in ABAP OO ?

    if you look at the code inside
    cl_gui_frontend_services->gui_upload they use gui_upload function.
    there is no difference.
    internally the class also uses GUI_UPLOAD ..........
    there is conflict like data consistancy problem with function module ..
    why again sap is using funtion modules in class method ...
    Instead sap can develope method purely by coding in method  know ?
    Can any body explain what are the advantages and disadvantages ?

    Hi,
    I think the FM can be used by only one way, with the same calls way( depending for parameters ) and always with the same behavior.   
    But if you extends the class you can inherits the class's components and insert new attributes.
    This is one of the benefits of the OO.
    Each SAP's release, many FM are being modified to OO.
    Regards,
    Marcelo Ramos

  • FUNTION MODULE /CRYSTAL/MDX_GET_STREAM_INFO"

    Hi Ingo,
    I opened a separate thread here just in case for your reply on this error.
    BO-CRYSTAL REPORT  2008--" FUNTION MODULE   /CRYSTAL/MDX_GET_STREAM_INFO"
    Thanks

    Hi Richard,
    you should only open one entry for one problem - not two.
    Ingo

  • Issue with filename in gui_download fn module

    Hi,
    i have an issue with the filename of text file that was dowloaded using gui_download fn module.
    PARAMETERS : p_file TYPE rlgrap-filename.
    CONCATENATE s_laufd-low6(2) s_laufd-low4(2) INTO gv_dt.
    CONCATENATE 'HINL' gv_dt '.001' INTO p_file.
    START-OF-SELECTION.
      DATA: v_file TYPE string.
      v_file = p_file.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = v_file
          filetype                = 'ASC'
          append                  = 'X'
        TABLES
          data_tab                = it_tab[]
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    data is downloaded into the textfile with filename as HINL2411 truncating the decimal part.
    How can i get the filename along with the decimal part as HINL2411.001.
    Thanks

    Hi ,
    Declare p_file  as TYPE string

  • Variable size item formulla key funtion module,

    I am developing user interface for manual reservation (cutsom development). User wants to calculate quantity of material if he enters size1, size2 and size3. Also he wants that a formula key option to be provided so that he can mention conversion formula. Is there any standard function module for variable size formulla funtion module.
    I want to use same logic of variable size item formulla of bom in the above custom template.
    Please suggest.

    Hi
    The function module EVAL_FORMULA and FORMULA_EVALUATION may help you as they all export calculated values as output. Please go to SE37 to click the button 'Function module documentation' to see more information.
    Or go to SE80 to check the function group CALC to see more function.
    Best Regards
    Leon.

  • Heading  during downloading into local file using GUI_DOWNLOAD fun.module

    Hi Guru's
    we have a requirement that we want the plant description as a heading (first line of the file) in the local file. iam using "GUI_DOWNLOAD" function module for downloading data for which iam passing the charecter type internal table. before downloading iam passing all the filed headings to that table and then appending the internal table data into it. now iam getting data properly with field headings . but before that heading i want one more description for a plant field which iam using in my selection screen
    in the fun.module "GUI_DOWNLAOD"
    we have HEADER file but it is of XSTRING type so it is taking only 2 char.
    so how to use this . Plz help me.
    thanks well in advance.
    UR's
    GSANA

    Hi,
    Please check the below link,
    header in 'gui_download'
    Also check Manoj kumar's reply in the link,
    header information to gui_download
    Hope this helps.
    Best Regards.

  • Issue with gui_download function module

    Hi All,
             I have an issue with gui_download function module that it is creating one extra line while downloading my internal table data into text file,which i donot want.i have searched for various threads but couldnot get the proper reply.Or please provide me some other Function Module which will not create one extra line.Please help.

    part 2
    INCLUDE RPPPXD00.
    DATA : BEGIN OF COMMON PART A.
    INCLUDE RPPPXD10.
    DATA : END OF COMMON PART.
    INCLUDE PC2RXTW0.
    INCLUDE RPC2RX00.
    DATA : BEGIN OF COMMON PART B.
    INCLUDE RPC2CD00.
    DATA : END OF COMMON PART.
    INCLUDE RPPPXM00.
    INCLUDE RPCMGR00.
    AT SELECTION-SCREEN OUTPUT.
      CONCATENATE SY-DATUM2(6) SY-UZEIT0(4) INTO REF_NO.
      LOOP AT SCREEN.
        IF R1 = 'X'.
          IF SCREEN-NAME = 'FLN' OR SCREEN-NAME = '%_FLN_%_APP_%-TEXT' OR
             SCREEN-NAME = 'BTC'  OR SCREEN-NAME = '%_BTC_%_APP_%-TEXT' OR
            SCREEN-NAME = 'PY_DT' OR SCREEN-NAME = '%_PY_DT_%_APP_%-TEXT'"SOC BY ANKITA"
           OR SCREEN-NAME = 'ORG_ID' OR SCREEN-NAME = '%_ORG_ID_%_APP_%-TEXT'
           OR SCREEN-NAME = 'ORG_AC' OR SCREEN-NAME = '%_ORG_AC_%_APP_%-TEXT'
           OR SCREEN-NAME = 'DEPT_CD' OR SCREEN-NAME = '%_DEPT_CD_%_APP_%-TEXT'
           OR SCREEN-NAME = 'REF_NO' OR SCREEN-NAME = '%_REF_NO_%_APP_%-TEXT'
           OR SCREEN-NAME = 'PRS_BNK' OR SCREEN-NAME = '%_PRS_BNK_%_APP_%-TEXT'
           OR SCREEN-NAME = 'TRANS_TY' OR SCREEN-NAME = '%_TRANS_TY_%_APP_%-TEXT'
           OR SCREEN-NAME = 'TRANS_ID' OR SCREEN-NAME = '%_TRANS_ID_%_APP_%-TEXT'
           OR SCREEN-NAME = 'TRANS_RK' OR SCREEN-NAME = '%_TRANS_RK_%_APP_%-TEXT'."EOC BY ANKITA
            SCREEN-ACTIVE = 0.
          ENDIF.
        ENDIF.
        IF R2 = 'X'.
          IF SCREEN-NAME = 'FLN' OR SCREEN-NAME = '%_FLN_%_APP_%-TEXT' OR
             SCREEN-NAME = 'BTC'  OR SCREEN-NAME = '%_BTC_%_APP_%-TEXT' OR
             SCREEN-NAME = 'PREPBY' OR SCREEN-NAME = '%_PREPBY_%_APP_%-TEXT'
             OR SCREEN-NAME = 'APROBY' OR SCREEN-NAME = '%_APROBY_%_APP_%-TEXT'
             OR SCREEN-NAME = 'PY_DT' OR SCREEN-NAME = '%_PY_DT_%_APP_%-TEXT' "SOC BY ANKITA
             OR SCREEN-NAME = 'ORG_ID' OR SCREEN-NAME = '%_ORG_ID_%_APP_%-TEXT'
             OR SCREEN-NAME = 'ORG_AC' OR SCREEN-NAME = '%_ORG_AC_%_APP_%-TEXT'
             OR SCREEN-NAME = 'DEPT_CD' OR SCREEN-NAME = '%_DEPT_CD_%_APP_%-TEXT'
             OR SCREEN-NAME = 'REF_NO' OR SCREEN-NAME = '%_REF_NO_%_APP_%-TEXT'
             OR SCREEN-NAME = 'PRS_BNK' OR SCREEN-NAME = '%_PRS_BNK_%_APP_%-TEXT'
             OR SCREEN-NAME = 'TRANS_TY' OR SCREEN-NAME = '%_TRANS_TY_%_APP_%-TEXT'
             OR SCREEN-NAME = 'TRANS_ID' OR SCREEN-NAME = '%_TRANS_ID_%_APP_%-TEXT'
             OR SCREEN-NAME = 'TRANS_RK' OR SCREEN-NAME = '%_TRANS_RK_%_APP_%-TEXT'."EOC BY ANKITA
            SCREEN-ACTIVE = 0.
          ENDIF.
        ENDIF.
        IF R3 = 'X'.
          IF SCREEN-NAME = 'PREPBY' OR SCREEN-NAME = '%_PREPBY_%_APP_%-TEXT'
            OR SCREEN-NAME = 'APROBY' OR SCREEN-NAME = '%_APROBY_%_APP_%-TEXT'
            OR SCREEN-NAME = 'PY_DT' OR SCREEN-NAME = '%_PY_DT_%_APP_%-TEXT' "SOC BY ANKITA
            OR SCREEN-NAME = 'ORG_ID' OR SCREEN-NAME = '%_ORG_ID_%_APP_%-TEXT'
            OR SCREEN-NAME = 'ORG_AC' OR SCREEN-NAME = '%_ORG_AC_%_APP_%-TEXT'
            OR SCREEN-NAME = 'REF_NO' OR SCREEN-NAME = '%_REF_NO_%_APP_%-TEXT'
            OR SCREEN-NAME = 'DEPT_CD' OR SCREEN-NAME = '%_DEPT_CD_%_APP_%-TEXT'
            OR SCREEN-NAME = 'PRS_BNK' OR SCREEN-NAME = '%_PRS_BNK_%_APP_%-TEXT'
            OR SCREEN-NAME = 'TRANS_TY' OR SCREEN-NAME = '%_TRANS_TY_%_APP_%-TEXT'
            OR SCREEN-NAME = 'TRANS_ID' OR SCREEN-NAME = '%_TRANS_ID_%_APP_%-TEXT'
            OR SCREEN-NAME = 'TRANS_RK' OR SCREEN-NAME = '%_TRANS_RK_%_APP_%-TEXT'."EOC BY ANKITA
            SCREEN-ACTIVE = 0.
          ENDIF.
        ENDIF.
        IF R4 = 'X'.
          IF SCREEN-NAME = 'PREPBY' OR SCREEN-NAME = '%_PREPBY_%_APP_%-TEXT'"SOC BY ANKITA
             OR SCREEN-NAME = 'APROBY' OR SCREEN-NAME = '%_APROBY_%_APP_%-TEXT'
             OR SCREEN-NAME = 'BTC'  OR SCREEN-NAME = '%_BTC_%_APP_%-TEXT'."EOC BY ANKITA
            SCREEN-ACTIVE = 0.
          ENDIF.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    START-OF-SELECTION.
      SELECT SINGLE * FROM T549Q WHERE PERMO = '01'
                                 AND   PABRJ = PRD+0(4)
                                 AND   PABRP = PRD+4(2).
      FR_DT = T549Q-BEGDA.
      TO_DT = T549Q-ENDDA.
      CONCATENATE FR_DT0(4) FR_DT4(2) INTO FR_P.
      CONCATENATE TO_DT0(4) TO_DT4(2) INTO TO_P.
      PN-PAPER = PRD.
      PN-PERMO = '01'.
    GET PERNR.
      RP-PROVIDE-FROM-LAST P0003 SPACE PN-BEGDA PN-ENDDA.
      RP_PROVIDE_FROM_LAST P0001 SPACE PN-BEGDA PN-ENDDA.
      IF PNP-SW-FOUND EQ 1.
       SN = SN + 1.
       ITAB1-SNO = SN.
       ITCC-SNO = SN.
        ITAB1-ENO = PERNR-PERNR.
        ITAB1-NAM = PERNR-ENAME.
      ELSE.
        REJECT.
      ENDIF.
      RP-INIT-BUFFER.
      RP-SEL-CALC.
      CALL FUNCTION 'RP_EVALUATION_PERIODS'
        EXPORTING
          LAST_CALCULATED_DAY = P0003-ABRDT
          LAST_DAY_IN_PERIOD  = TO_DT
          RETROCALCULATED_DAY = RP-SEL-CALC-RRDAT
        TABLES
          DIR                 = RGDIR
          EVP                 = EVP
        EXCEPTIONS
          RGDIR_EMPTY         = 1
          INTERNAL_ERROR      = 2
          OTHERS              = 3.
      DESCRIBE TABLE EVP LINES LIN.
      IF LIN > 0.
        LOOP AT EVP.
          IF EVP-IAPER = TO_P AND EVP-PAPER = TO_P.
            RX-KEY-PERNR = PERNR-PERNR.
            UNPACK EVP-SEQNR TO RX-KEY-SEQNO.
            RP-IMP-C2-TN.
            READ TABLE BT INDEX 1.
            READ TABLE WPBP INDEX 1.
            READ TABLE TAX INDEX 1."CHANGES BY ANKITA
            ITAB1-BAC = BT-BANKN.
            ITAB1-BKEY = BT-BANKL .
            ITAB1-DEP = WPBP-KOSTL.
            ITAB1-BETRG = BT-BETRG."CHANGES BY ANKITA
            ITAB1-TAXID = TAX-TAXID."CHANGES BY ANKITA
            YEAR = VERSC-PAYDT+0(4) - 11.
            MONTH = VERSC-PAYDT+4(2).
            DAY = VERSC-PAYDT+6(2).
            CONCATENATE YEAR MONTH DAY INTO ITAB1-PDT.
           ITAB1-PDT = VERSC-PAYDT - 110000.
            ITCC-DEP = WPBP-KOSTL.
            LOOP AT RT WHERE LGART = '/559'.
              ITAB1-BTFR = RT-BETRG.
              ITCC-BTFR = RT-BETRG.
             IF EVP-SRTZA = 'P'.
               ITAB1-BTFR = ITAB1-BTFR - RT-BETRG.
             ELSE.
               ITAB1-BTFR = ITAB1-BTFR + RT-BETRG.
             ENDIF.
            ENDLOOP.
          ENDIF.
        ENDLOOP.
      ENDIF.
      APPEND: ITAB1, ITCC.
      CLEAR: ITAB1, ITCC.
    END-OF-SELECTION.
      CONCATENATE 'Prepared By:' ` ` PREPBY INTO PREPBY.
      CONCATENATE 'Approved By:' ` ` APROBY INTO APROBY.
      IF R1 = 'X'.
        FORMAT COLOR 2.
        ULINE (127).
        NEW-LINE.
        WRITE: 2 'Sr No.', 10 'Emp Num', 27 'Name'.
        WRITE: 57 'Department'.
        WRITE: 72 '  Transfer Amount' RIGHT-JUSTIFIED.
        WRITE: 92 'Bank Key', 107 'Bank AC. Number'.
        WRITE:1 '|', 8 '|', 25 '|', 55 '|', 70 '|', 90 '|', 105 '|', 127 '|'.
        NEW-LINE.
        ULINE (127).
        NEW-LINE.
        FORMAT COLOR OFF.
        LOOP AT ITAB1.
          SN = SY-TABIX.
          WRITE: 2 SN, 10 ITAB1-ENO, 27 ITAB1-NAM.
          WRITE: 57 ITAB1-DEP.
          WRITE: 72 ITAB1-BTFR.
          WRITE: 92 ITAB1-BKEY, 107 ITAB1-BAC.
          WRITE: 1 '|', 8 '|', 25 '|', 55 '|', 70 '|', 90 '|', 105 '|', 127 '|'.
          ULINE (127).
          NEW-LINE.
        ENDLOOP.
        SKIP 4.
        ULINE 90(32).
        NEW-LINE.
        WRITE: 90 PREPBY.
        SKIP 4.
        ULINE 90(32).
        NEW-LINE.
        WRITE: 90 APROBY.
      ENDIF.
      IF R2 = 'X'.
        LOOP AT ITCC.
          COLLECT ITCC INTO ITCOL.
        ENDLOOP.
        FORMAT COLOR 2.
        ULINE (44).
        NEW-LINE.
        WRITE:2 'Sr No.', 9 'Department'.
        WRITE: 27 'Transfer Amount  ' RIGHT-JUSTIFIED.
        WRITE:1 '|', 8 '|', 25 '|', 44 '|'.
        NEW-LINE.
        ULINE (44).
        NEW-LINE.
        FORMAT COLOR OFF.
        LOOP AT ITCOL.
          SN = SY-TABIX.
          WRITE: 2 SN, 9 ITCOL-DEP, 27 ITCOL-BTFR.
          WRITE:1 '|', 8 '|', 25 '|', 44 '|'.
          NEW-LINE.
          ULINE (44).
          NEW-LINE.
        ENDLOOP.
      ENDIF.
      IF R3 = 'X'.
        LOOP AT ITAB1.
          CLEAR: ITTF, P3, P11, P13, P6, V_BAC.
          LEN = STRLEN( ITAB1-BKEY ).
          IF LEN < 3.
            CONCATENATE ITAB1-BKEY '***' INTO P3.
          ELSE.
          LEN = LEN - 3.
            LEN = 3.
            P3 = ITAB1-BKEY+LEN(3).
          ENDIF.
          CLEAR LEN.
          V_BAC = ITAB1-BAC.
          REPLACE ALL OCCURRENCES OF '-' IN ITAB1-BAC WITH ''.
          CONDENSE ITAB1-BAC NO-GAPS.
          LEN = STRLEN( ITAB1-BAC )."if length of acc num > limit
          IF LEN > 11.
            IT_FAIL-EN = ITAB1-ENO.
            IT_FAIL-BA = V_BAC.
            APPEND IT_FAIL.
            CLEAR: IT_FAIL.
            CONTINUE.
          ENDIF.
          P11 = ITAB1-BAC.
          CONCATENATE P11 '***********' INTO P11.
    above step is for putting '' in place of unfilled chars of P11.
          P13 = ITAB1-BTFR * 100.
          P6 = ITAB1-PDT+2(6).
          CONCATENATE ` ` P3 P11 BTC P13 P6 INTO STR.
          ITTF-ROW = STR.
          APPEND ITTF.
        ENDLOOP.
        IF ITTF[] IS NOT INITIAL.
          CONCATENATE FLN SY-DATUM SY-UZEIT '.txt' INTO FILEPATH.
          CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
            FILENAME                        = FILEPATH
            FILETYPE                        = 'ASC'
         WRITE_FIELD_SEPARATOR           = 'X'
            TABLES
            DATA_TAB                        = ITTF
         OTHERS                          = 22
          SKIP 2.
          IF SY-SUBRC <> 0.
            WRITE:/ 'Unable to Download file at ', FILEPATH.
          ELSE.
            WRITE:/ 'File with following data downloaded at ', FILEPATH.
            NEW-LINE.
            SKIP 2.
            LOOP AT ITTF.
              WRITE:/ ITTF.
            ENDLOOP.
          ENDIF.
        ELSE.
          WRITE 'No Data, no file was downloaded'.
        ENDIF.
        IF IT_FAIL[] IS NOT INITIAL.
          SKIP 2.
          FORMAT COLOR 2.
          WRITE 'Acc. No. of following employees exceeded the length limit'.
          WRITE:/ 'So their entry was not created in the file'.
          SKIP 1.
          WRITE : 'Employee Number', 20 'Bank Acc. No.'.
          FORMAT COLOR OFF.
          LOOP AT IT_FAIL.
            NEW-LINE.
            WRITE : IT_FAIL-EN, 20 IT_FAIL-BA.
          ENDLOOP.
        ENDIF.
      ENDIF.
      IF R4 = 'X'."CHANGES BY ANKITA
        WRITE:/ 'ERROR LOG - BANK A/C NO. CONTAINS ALPHANUMERIC'.
        WRITE:/ 'EMPID' COLOR COL_POSITIVE,12 '|',15 'Receiving Bank Code' COLOR COL_POSITIVE,
                                                                      40 '|','Receiver A/C No' COLOR COL_POSITIVE.
        PERFORM EXTRACT_DATA.
        SKIP 2.
      ENDIF."EOC
      RP-READ-PAYROLL-DIR.
    Edited by: ANKITA BHARDWAJ on Dec 9, 2009 10:36 AM

  • How to Update  crmd_customer_h TABLE Using CRMV_EVENT Through Funtion Module

    Hi
    How we can update customer_h table using the CRMV_EVENT Where i implemented logic below in the Funtion Module.
    data:     lt_doc_flow          TYPE crmt_doc_flow_wrkt,
              lw_cust_h_com        TYPE crmt_customer_h_com,
              lw_input_field_names TYPE crmt_input_field_names,
              lt_input_field_names TYPE crmt_input_field_names_tab,
              lt_objects_to_save TYPE crmt_object_guid_tab,
              lw_guid TYPE CRMT_OBJECT_GUID.
    DATA : lv_process_type TYPE crmt_process_type.
    data: wa_doc_flow type CRMT_DOC_FLOW_WRK.
    data: wa_customer_h type crmd_customer_h.
    *  Function module for retriving the Process type.
      CALL FUNCTION 'CRM_ORDERADM_H_READ_OW'
        EXPORTING
          iv_orderadm_h_guid     = iv_header_guid
        IMPORTING
          ev_process_type        = lv_process_type
        EXCEPTIONS
          admin_header_not_found = 1
          OTHERS                 = 2.
    if lv_process_type eq 'ZG01'.
    CALL FUNCTION 'CRM_DOC_FLOW_READ_OB'
    EXPORTING
       IV_HEADER_GUID                 = iv_header_guid
    IMPORTING
       ET_DOC_FLOW_WRK                = lt_doc_flow.
    read table lt_doc_flow with key objtype_a = 'BUS2000116' INTO wa_doc_flow. "gc_object_type-service.
                if sy-subrc eq 0.                    "set flag for service order
                lw_cust_h_com-ref_guid       =  wa_doc_flow-objkey_a.
                lw_cust_h_com-ZZTRAIL_FLAG   = 'X'.
                 lw_cust_h_com-mode           = 'A'.
                lw_cust_h_com-ref_handle     = '0000000001'.
                lw_guid = wa_doc_flow-objkey_a.
                INSERT lw_guid INTO TABLE lt_objects_to_save.
         endif.
                  lw_input_field_names-fieldname = 'REF_GUID'.
                lw_input_field_names-fieldname = 'ZZTRAIL_FLAG'.
              lw_input_field_names-changeable = ' '.
               INSERT lw_input_field_names INTO TABLE lt_input_field_names.
    Maintain Customer H
             CALL FUNCTION 'CRM_CUSTOMER_H_MAINTAIN_OW'
                  EXPORTING
                    is_customer_h_com    = lw_cust_h_com
                  CHANGING
                    ct_input_field_names = lt_input_field_names
                  EXCEPTIONS
                    header_change_error  = 1
                    header_create_error  = 2
                   error_occurred       = 3.
    ENDIF.
    *endif.
    *Clearing local variables
      clear: lv_process_type,
             lw_cust_h_com,
             lw_input_field_names.
    *Free internal tables
      free: lt_doc_flow,
            lt_input_field_names.

    Hi Faisal
    I think your not clear with what i am saying anyhow i will again explain you my requirement
    As per my requirement
    1)in the service order search report i need to add a field called "Has trail order with No Follow up" with values "Yes" & "Blank"
    For above Field i added  using the structure CRMST_QUERY_SRVO_BTIL and through configuration i am able to display the field in webui as per (Attachement Pic 1)
    2)When i  search with search criteria as  "Has trail order with No Follow up" with  "Yes"
    Then in result list i need to show the service order those having follow up as trail orders(sales order) only.if for  next document trail order  having any follow up then those service orders dont want to show in result list.
    For above requirement i implemented F.M using CRMV_EVENT & I configured for BUS2000115 And BEFORE_SAVE The Order
    The FM Will get trigger when i save the service order and for that service order if create any follow up and try to save the trail order then This FM Will trigger and in this i am doing validations.
    3)Add one AET Trail Flag field is added under CUSTOMER_H Table.
    4)in the FM I am validating for if the trail order having the preceding document as service order then i need to make flag as "X" For that service order in customer_h
    if suppose when i delete trail order from the service order then that flag must need to be "unset" from the CUSTOMER_H.
    Why bcoz we are doing above process is do show records in result list based on Flag values
    these flag checks are validating in the BADI Which we implemented for search logic.
    Please refer below Login for my requirement:-
    Proposal to have a custom “flag” field (background at table level,
         crmd_customer_h) linked to service order which gets flagged whenever at
         least one Trial order is created and saved from the Service Order.
    The flag value should be cleared when all the trial orders created and
    saved as follow up transactions are deleted from the system.
    Similarly for Trial Orders will use the same custom “flag” field
         which gets activated when at least one follow up is created and saved from Trial Order.
    The flag value should be cleared when all the follow up transactions from
    the Trial Order are deleted from the system.
    When the above search criteria “Has Trial order with no follow up”
         “is” “Yes” is applied then the logic derives all the service
         orders which satisfy additional search criteria applied in the search and
         for these Service orders checks if the custom flag field is checked to
         derive all Service orders which have Trial order. The custom flag values
         values are derived from crmd_customer_h table in CRM.
    4 )Further for all the Trial Orders determined in Step 3
    check if the Trial Order has a follow up by checking if the custom flag field
    is checked. The custom flag values are derived from crmd_customer_h table in
    CRM.
    5) If step 4 is not met populate the preceding Service
    Orders in the Result list

  • Funtion Module in accounting document

    Hi All,
    Can someone tell what function module is called while creating the accounting document and what are its important import and export parameters?
    Regards
    Vijay

    Hi Vijay,
    The most important funtion module responsible to creating accounting documentt is RV_ACCOUNTING_DOCUMENT_CREATE . Below are its important import and export parameters:
    Import parameters
    CASH_SALE_ACCOUNT : contains the cash clearing account, if this is not to be posted to the customer 
    CPD_ADRESS: must be filled if you are posting to a one-time customer        
    DOCUMENT_OLD : contains the $000000x number of the billing document, as VBRK-VBELN already has the final value, XVBRP and so on still contain $000000x
    INVOICE_HEADER : Contains the billing header VBRK
    I_COMP : Control parameter, if only CO is to be posted            
    I_COMP_CHECK :   Control parameter if only CO is to be posted (check run)
    CHECK : Controlling for error messages (issue immediately or in log)            
    MODE : Change mode ( A = old, B = new)           
    MODE_TYPES  : Scope of change (1=rebate/2=VPRS)
    Differences can occur due to the update of cost price conditions or rebate conditions in billing documents that have already been posted. These two fields (MODE and MODE_TYPES) are required to enable the posting of those differences to CO-PA.
    RRREL: If this field is set, the billing document contains revenue recognition items             
    BOKRE  : If this field is set, the billing document is rebate-relevant
    These  two fields (RRREL and BOKRE) are required for the new cancellation function as of Release 4.6A. This is because the new cancellation procedure cannot be implemented for revenue recognition or rebate relevant billing documents.           
    Export parameters
    O_VBRK_RFBSK: This is set if an error has occured in account determination ( characteristic B)
    O_KONV_CHANGED: This is set if XKOMV is changed in account determination
    Regards
    Roop

  • Inbound funtion module to process PORDCH02 IDOC

    Hi,
    I am getting a inbound purchase order PORDCH02 IDOC and i need to change the purchse order based on the idoc value , pls let me know the standard inbound purchase order funtion module attached to inbound process code.
    Thanks
    Ravi

    Hi,
    The message type and basic idoc type for the processing of purchase orders:
    PORDCH                 PORDCH01                -- For change
    PORDCR1               PORDCR101              -- For Create
    Regards,
    Ginu Litta Raj

  • Funtion Module to convet Date's month from numeric to words ???

    Hi guys,
    I have a requirement such that:-
    For Date:- 06.07.2007 (DD.MM.YYYY)
    i want it to display as 06-July-2007
    Is there any funtion module to do that.
    Regards
    Rahul

    Hi,
    Please use code as under :
    data : date(10),
            text1(26),
            num1(10),
            test_day(15),
            o_date(20),
            idate type sy-datum.
    data : Day(2), month(2), Year(4).
    data : ODay(2), Omonth(2), OYear(4).
    data : Ltext Type T247-LTX.
    date = '06.07.2007'.
    day = date+0(2).
    month = date+3(2).
    year = date+6(4).
    concatenate year month day into idate.
    CALL FUNCTION 'HR_IN_GET_DATE_COMPONENTS'
      EXPORTING
        idate                               = idate
    IMPORTING
       DAY                                 = oday
       MONTH                               = omonth
       YEAR                                = oyear
       LTEXT                               = ltext.
    concatenate oday '-' ltext '-' oyear into o_date.
    write : O_date.
    Reward points, if helpful,
    Sandeep Kaushik

  • ERROR  WHILE ACTIVATING  FUNTIONAL MODULE

    HI everybody,
    i have created one functional module
    code is correct
    but at last while activating i am getting error like
    'REPORT OR PROGRAM STATEMENT MISSING OR PROGRAM TYPE IS
    I(INCLUDE).
    COULD U PLZ SUGGEST ME HOW TO SOLVE THIS ERROR
    REGARDS
    HRIDHAYANJILI.

    Hello,
    Go to the main program of the Funtion module. and do activate. Select all the deactivated programs related to Function group and then press activate.
    Regards,
    Naimesh

  • How to get Documentation on Funtion Module

    hi Experts,
    I want to know where can we find the documentation of a FM like for a badi... you can get it from spro..srm...Business add in... where u can click on documentatio....
    But how to get documentation fo Funtion module , for example if want to get docs related to FM "BBP_PD_SC_GETDETAIL" how to get it....
    Thanks
    sameer

    Hi. If you go to SE37 and enter the FM name, then press display, there is a button top right called "Function Module Documentation".
    It is not maintained for every function though, if the button is greyed out there is nothing. If there is nothing there I do not know if there is anywhere else to look, apart from SDN of course....
    Regards,
    Dave.

Maybe you are looking for

  • Left Join query: revisited... I have to explain at user meeting tomm. pls..

    Hi Everyone, Can someone pls shed some light on the situation below I am understanding alot of what Michael and Rod wrote.... with my prev. post of LEFT JOIN and testing for not null and doing a double Boolean OR etc. - but- AM NOT understanding why

  • Dunning Smartform issue

    While configuring the Smartform for Dunning F150_DUNN_SF it says that it is does not active nor exists.  Then added this function module FI_PRINT_DUNNING_NOTICE_SMARTF using the transaction code BF31.  Suggested by SAP Note. When dunning transaction

  • Multiple webhelp indexes

    What I want to do in Robohelp seems like it should be possible but I cannot seem to figure out how to do it.  I have a single project file that contains multiple folders, one for each application in a suite of related applications.  Currently in webh

  • Lyrics Not Saving on iTunes files on AirDisk

    I've got my music files on an external hard drive connected to my Airport Extreme via the USB AirDisk. I haven't been able to get iTunes to save any of the lyrics when I add the lyrics in the "Get Info --> Lyrics" area. Any clues why not or how to fi

  • How do I have only company name showing on my acco...

    Hello, I just opened a Skype account for my new business; however, I would like the account to be identified with my business name only, which is my user ID at the moment.  However, when I open Skype, my name is shown above my business name.  Is ther