Concatenate structure with 63 fields

Hi all,
I have a structure with 63 fields. We have to send all this data in text file as an email attachment. What is the best way to concatenate all this field separated by tab?
Thanks.

Hello,
Try using Filed Symbols . Let your structure be WA_TEST type ZTEST.
Data string type X
Field Symbol <fs> type any
Do.
ASSIGN COMPONENT sy-index OF STRUCTURE WA_TEST TO <fs>.
If Sy-subrc NE 0.
Exit.
Conactenate STRING  <fs> into STRING  separated by co_tab.
Endif.
regards
Saket Sharma
EndDo.

Similar Messages

  • Can I enhance extract structure with standard field?

    Friends,
    Can I enhance the extract structure with standard field.
    Eg. If I want add(append) field PACKNO to Extraction structure MCVGIH. PACKNO is a field from standard table. So Can I do this and populate this without using abap code(customer exit) Should I give foreign key field also in the append stucture.
    Please help me
    Joe

    Hi Joe,
    mostly it works as A.H.P explained, because in the extractor they mostly do a move-corresponding of the fields. Sometimes they don't, specially for newer applications and extractors because the abap statement move-corresponding is on the list of obsolete statements. In that case you need to do some coding.
    So basically I would recommend to add the field, regenerate the datasource and check the result with rsa3.
    regards
    Siggi
    Message was edited by: Siegfried Szameitat

  • Assigning structures with different fields to a field symbol

    Hi,
    can anybody give a example code of how to assign a structure to a field symbol in aloop if the structure is containing more than 1 type of data .
    i am giving the code please try so that it could run ina unicode environment.and doesnt give dump.
    TABLES: SNAP,
            SNAP_BEG,
            SNAPT.
    DATA: BEGIN OF I_SNAP_BEG OCCURS 0.
            INCLUDE STRUCTURE SNAP_BEG.
    DATA    TCODE LIKE SY-TCODE.
    DATA    REPID LIKE SY-REPID.
    DATA    TLINE LIKE SNAPT-TLINE.
    DATA    SIGN(1).
    DATA  END OF I_SNAP_BEG.
    DATA    DATUM LIKE SY-DATUM.
    DATA: BEGIN OF FCC,
               ID(2), LL(3), ERRID LIKE SNAPT-ERRID,
            END OF FCC.
      FIELD-SYMBOLS: <F> .
      SELECT * FROM SNAP_BEG INTO TABLE I_SNAP_BEG.
        SELECT * FROM SNAP UP TO 1 ROWS
                   WHERE DATUM = I_SNAP_BEG-DATUM.
        ENDSELECT.
        MODIFY I_SNAP_BEG.
    LOOP AT I_SNAP_BEG ASSIGNING <F>.
        MOVE-CORRESPONDING I_SNAP_BEG TO SNAP.
        FCC = I_SNAP_BEG-FLIST.
        IF FCC-LL CO '0123456789'.
         ASSIGN FCC-ERRID(FCC-LL) TO <F>.
          SNAPT-ERRID = <F>.
        ELSE.
          SNAPT-ERRID = '?????'.
        ENDIF.
    ENDLOOP.
    WRITE : <F>.

    hi it useful

  • Problem in using a structure with a field of  data type 'RAW STRING'

    Friends
    I have written a ZBAPI that imports a structure which has 5 fields. I have defined this in the IMPORT tab of Tr.Code <SE37>.  One of the field of this structure is of data type 'RAW STRING'.
    When I try to activate this BAPI, I get an error message as follows:
    Function Module ZBAPI_ADD_CONFIG_DNA
    "ZDAMPER_CON_DNA" Must be a flat structure. You cannot use internal table
    strings, references, or structures as components.
    Where ZDAMPER_CON_DNA is the table name that I am using.
    FOR TESTING PURPOSE, WHEN I CHANGE THE DATA TYPE FROM 'RAW STRING' TO JUST A CHAR OF LENGHT 5, IT WORKS FINE.
    Here is the source code of the simple BAPI that i am trying to activate.
    FUNCTION ZBAPI_ADD_CONFIG_DNA.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(CONFIG_DNA_DATA) TYPE  ZCONFIG_DNA_STRUCTURE
    *"  EXPORTING
    *"     VALUE(MESSAGE) TYPE  ZRETURNMESSAGE
    tables: ZDAMPER_CON_DNA.
        ZDAMPER_CON_DNA-CONFIG_ID       =     CONFIG_DNA_DATA-CONFIG_ID.
        ZDAMPER_CON_DNA-STRING_NAME     =     CONFIG_DNA_DATA-STRING_NAME.
        ZDAMPER_CON_DNA-STRING_FORMAT   =     CONFIG_DNA_DATA-STRING_FORMAT.
        ZDAMPER_CON_DNA-STRING_VALUE    =     CONFIG_DNA_DATA-STRING_VALUE.
        ZDAMPER_CON_DNA-OBJECT_NAME     =     CONFIG_DNA_DATA-OBJECT_NAME.
        INSERT ZDAMPER_CON_DNA.
        MESSAGE-SUBRC = sy-subrc.
        if sy-subrc = 0.
            MESSAGE-RETURNMESSAGE = 'SuccessfullyInserted'.
        else.
            MESSAGE-RETURNMESSAGE = 'Insert Failed'.
        endif.
    =============
    ANY KIND OF FEED BACK WILL BE HIGHLY APPRECIATED.
    THANKS
    RAM

    Hi ram,
    there is no data element exists with the name RAW STRING ,
    but check one of these names..
    Data element                   Short text
    C2S_RAWSTRING                  C2-Server: Data Element of Type Rawstring
    N2_RAWSTRING                   Byte String of Variable Length
    QISRDRAW_STRING                Data in Format RAW Character String
    RCF_RAWSTRING                  Rawstring
    RPAP_TEMPLATE_RAWSTRING        Blob of Template File
    RSRAWSTRING                    Raw String
    RSRD_RAWSTRING                 Binary Content in the Broadcasting Framework
    SWH_RAWSTRING                  Workflow: Data Type RAWSTRING
    WDR_RAWSTRING                  Byte Sequence of Variable Length
    <REMOVED BY MODERATOR>
    venkat.
    Edited by: Alvaro Tejada Galindo on Mar 7, 2008 5:15 PM

  • How to access a field of a structure with a field symbol?

    Dear all,
    Currently I'm trying to access the fields of a structure (called "ls_tbl") dynamicly. The code looks as follows (of course the field symbols are defined correctly ;-):
        ASSIGN lv_f1 TO <lv_f1>.
        ASSIGN lv_f2 TO <lv_f2>.
        lv_pp = ls_tbl-(<lv_f1>).
        lv_pt = ls_tbl-(<lv_f2>).
    Unfortunatly I get the following error message:
    <<The data object "LS_TBL" does not have a component called "".>>          
    I really do not understand why ABAP is trying to interpret the field symbol name as a string. Does anybody have a clue how to access the field of ls_tbl with the help of a field symbol?
    Many thanks!!!

    Hi ,
    Please check the below sample code .
    data : begin of st_table,
                myfiledname type c value '1',
                myfiledname1 type c value '2',
           end of st_table .
    data : lv_filedname(11) type c value 'MYFILEDNAME'
    filed-symbols : <fs> type any,
                    <fs_table> type any.
    assign st_table to <fs_table>.
    Assign lv_filedname to <fs> .
    assign component <fs> of structure <fs_table> to lv_pp.
    Regards,
    Ratheesh BS

  • How to create a structure with reserved field

    hi :
        I meet  a problem .
        That when I cteate a global structure in ddic . named  zgs_outtab .
        The requirement  that let me create a  field . It's description is 'Sales office' and  reserved  this field ,and don't fill data for this filed .
        but I don't know the  data type ,so when I  check ,I report me the error .
       Which data type I should use .?
       Thank you .
    Description     Table     Fields     Remarks
    Sales office               reserved field   don't fill data
    Edited by: chao zhangchao on Feb 16, 2009 3:14 AM

    table: TVBUR Sales office
    TVKBT Sales office text

  • Table like structure with form fields

    In flash - How can we organize the form fields like a HTML
    table dynamically?

    Since performance may be an issue when hitting BSEG table
    Any of the below accounting tables can be used.
    1.BSAD
    2.BSAK
    3.BSAS
    4.BSID
    5.BSIK
    6.BSIS
    These are normal database tables, not clusters. Normally every record from BSEG can be found in one of these 6 tables. The program which selects data
    From these tables runs faster than from BSEG.
    Plz reward if helpful.
    Thanks.
    Ramya

  • Structure with a string field as parameter in FM

    Hi,
    I have a requirement wherein based on some id which is the import paramter (table) i have to fetch some text of type string n pass as an export paramater. it has to be a table since for each id there wil a text associated with it.
    For this i have declared a structure with two fields, one client and the other, the text type string.
    While trying to activate my fm, it says that italicsthe structure should be a flat type. You cannot use internal tables. string, references etcitalics
    Please provide a solution.
    Regards,
    herwin.

    Hi Vikranth,
    ya using char or lchar would be one option and the other would be the use of the table type in the the import/export parameters. That worked without giving me that warning message and was able to execute my code properly with the desired output.
    Regards,
    Herwin.
    Edited by: Herwin Wilmet Dsouza on May 11, 2010 12:18 PM

  • Using SELECT_OPTIONS in Web Dynpro with currency fields

    I have an application where I use SELECT_OPTIONS to gather search parameter values for a query which has amount and currency fields.  In my WDDOINIT, I am calling add_selection_field to add the fields that I wish to use to search.  One of the fields is a currency key and another is the amount.  The query returns the found data in an ALV and each record has its amount formatted correctly based on the currency key field in each record.  This all works as it should.
    However, the search parameter for the amount field is always formatted based on its data type and not on the other search parameter with the currency key.  The currency key field does not allow multiples so it is either present or not (using the default would be fine if the currency key is not specified).  If it is specified, I would like it to format the amount.low and amount.high input fields correctly.
    For example, if I enter 'USD' in the currency key search field and '10' and '20' in the amount from/to fields, respectively, when I press the search button or hit enter, both the amount to/from fields' display changes to '10,00000' and '20,00000', respectively which is the data type definition of CURR19,5.
    I found no documentation on how to handle formatting of currency or quantities in the search fields when using SELECT_OPTIONS.  Has anyone solved this problem?  I looked at all the parameters to the add_selection_field method and cold not find a way to associate the currency key to the amount.  Any help would be greatly appreciated.

    Hi Mark,
    I don't think, it is possible to get the currency key reference for the amount fields in selection screen by using IF_WD_SELECT_OPTIONS.
    I would suggest you the below work around option
         If you do not have the requirement of passing multiple values in either currency key field or amount field, you can go for normal input fields to design your input screen.
    Create a structure with 3 fields , CURR, AMT_LOW, AMT_HIGH
    Use currency reference field in structure with self structure name and CURR field, so that amount fields refer to the same structure's currency key
    Create a node by using this structure and design the input fields from this context node
    Now, the amount fields have the reference of currency key from the structure and it should work fine
    Hope this helps you.
    Regards,
    Rama

  • Enhance BOL with Z-fields for Web Service

    Hello,
    I need to create Web Service for quotation.
    I want to add some Z-fields to this WS. I think I need to enhance BTAdminH BOL.
    I already append structure with Z-fields to BTAdminH BOL, however I don't know where I should write ABAP code for filling those fields.
    How can I find class for BTAdminH BOL, and how can I convert it to Z-class?
    Is it risky to do in already alive system?
    Best Regards,
    Veronica

    Hello Robert,
    I have already read this blog and my colleague tried to do the same, however we can't transfer it to QA system because the development is in local package (as it is described in the blog).
    Do you know how to transfer it to QA system?
    Failure to transfer to QA leads us to search other solution like enhance BOL.
    Veronica

  • Read a structure with out specifying its field/component names-Dynamically?

    Hello
    My requirements:
    I need to write a module pool prog., which updates a Z_material_master_data_table, which tables has 150 fields (i knew its odd having 150 fields in a master table).
    On the module pool prog. i need to place the fileds in 2 columns, say left column(for current data) with 150 fields and right column(user input data for updating the Z_material_master_data_table) with 150 fields
    When user opens the prog., user will be presented with a initial screen, where in user enters the material number (for which user want a updation ) then, the user will redirected to 2nd screen where in my prog. will default/prepopulate the left side fields with the current(old) data. Now user has to input his/her data (new) for updating any field of the z_master_data_table.
    And after finishing the user clicks a push button with title of 'UPDATE'
    Now, my prog. has update the entry in the z_material_master_data_table. The 2nd screen looks like below,
    _Currnet data_ -------------------------------------- _New data_
    Current Material description ---------------------- New Material description
    The field will placed here  ------------------------ The field will placed here to
    for showing the current data                              inputting the new data by user
    As there are 150 fields, i would not like to write validation (cross checking whether user entered the data on each field) on every field of 150 in number.
    The 2nd reason, they want the prog. a kind of dynamic in nature, like going further, if the business want to add a new field, say 151_field to the the table, they dont want to change the prog. (just keeping the 151_field should enough) to address this newely added field.
    By thinking field symbols approach, i created 2 structures for old data and another for new data. These structurer are replicas of z_material_master_data_table, but 2nd (new) structure field names posses a an extra 4 chararctes like '_UPD', say for example, ZZMAKTX will be the fileld name in structure_1 (old) and its name will be ZZMAKTX_UPD in 2nd structure(new)
    Pls. give me some code snippet for (my above requiremnet) reading a structure DYNAMICALLY with out specifying/mentioning the field names for each and every field or give me any better idea to meet my requirement
    Thank you

    From my understanding, your requirement was creating the Program to display the 150 fields of the custom Z-Table based on the material number.
    Once the user enters the Material number and click enter. It has to navigate to another screen with old data in one column and second column for the new data, Update button for saving the new data to backend Z-Table.
    Back end 150 fields will be changed based on the user requirement, So you need to implement it as dynamically.
    Solution:
    data : it_tabdescr type abap_compdescr_tab.
    data : ref_table_descr type ref to cl_abap_structdescr.
    DATA : cl_struct TYPE REF TO cl_abap_structdescr.
    data: p_table(30)  type C. value u2018Custom Z-table Nameu2019.
    Return structure of the table.
      ref_table_descr ?= cl_abap_typedescr=>describe_by_name( p_table ).
      it_tabdescr[] = ref_table_descr->components[].
    cl_struct ?= cl_abap_structdescr=>create( it_tabdescr ).
    CREATE DATA dyn_line TYPE HANDLE cl_struct.
    assign dyn_line->* to <fs_wa>.                                u201C<fs_wa> have the same structure of the Z-table
    CREATE DATA dyn_line1 TYPE HANDLE cl_struct.
    assign dyn_line->* to <fs_wa_update>.               u201C<fs_wa_ update> have the same structure of the Z-table
    Best Regards,
    Manigandan D
    Edited by: Manigandan Damodharan on Feb 4, 2012 8:58 PM

  • How to concatenate single quote with any field like 'VBAK'

    Hi,
    How to concatenate single quote with any fields.
    say for example I have table name as MARA, I have to pass that table name to other fields with single quote , like I have to pass that as
    tab name = 'MARA'.
    but how to do this,
    below statement will not work
    concatenate '''  'MARA'   ''' into string.. it's giving syntax error...
    Regards,
    Mrunal

    gv_name = 'MARA'.
    gc_quote = '''.
    CONCATENATE gc_quote gv_name gc_quote INTO value.
    Pushpraj

  • Dates in MD04 not matching with dat00 field of structure MDTBX

    Hi,
         I am trying to populate MDTBX structure using DTNUM field of MDKP as follows.
    "IMPORT mdtbx FROM DATABASE mdtc(ar) ID wa_mdkp-dtnum".
    Now the DATOO field of MDTBX will be same as dates in MD04 for a material , plant and a Vendor.
    But for some vendors DATOO of MDTBX has more dates when compared to dates in MD04 for the same Material and Plant.
    Why it happens so? I need the reply urgently. Kindly help me in this regard.

    Hi,
    To add the filed in the extract strucuure...
    Go to rsa6 find your data source... go to change mode >
    then double click on the extract structure... it will tale youe to the structure screen..
    Click on the Append strucutre button and add your required filed there... activate the append structure... go back and activate the structure also.
    now go back to rsa6 and again go into your data source now you can see the appended field, but it will be hidded. Remove that hiddedn check box... Save.
    Then write the code to pupulate data into that field.
    Regards,

  • Problems sending an email with a field attached.

    Hi everyone,
    I’m having problems with sending an e-mail (with a field attached) to an external e-mail address.
    I’m using the followings functions:
    <b>'SO_DOCUMENT_INSERT'
    'SO_OBJECT_UPLOAD'
    'SO_ATTACHMENT_INSERT'
    'SO_OBJECT_SEND'</b>
    Everything goes well (the functions are executed well), but the message stacks and it isn’t be sent.
    I can see it with the transaction SBWP, it is in the folder Exit/Documents with status: “Waiting communication service” .
    Then I can send it from there clicking at the button send. And then it is sent.
    Have anyone any clue about what I’ve missed to do.
    I really appreciate your help; I need to solve this problem as soon as possible.
    Kind regards.

    Hai
    report zemail no standard page heading line-size 220.
    data: message_content like soli occurs 10 with header line,
            receiver_list like soos1 occurs 5 with header line,
            w_object_hd_change like sood1.
    start-of-selection.
    Receivers
    receiver_list-recextnam = '[email protected]'.
    receiver_list-recesc = 'E'.
    receiver_list-sndart = 'INT'
    receiver_list-sndpri = '1'.
    append receiver_list.
    General data
    w_object_hd_change-objla = sy-langu.
    w_object_hd_change-objnam = 'Object name'.
    w_object_hd_change-objsns = 'P'.
    w_object_hd_change-file_ext = 'HTM'. "<--this is important
    Mail subject
    w_object_hd_change-objdes = 'HTML from SAP/ABAP'.
    Mail body
    append 'Message content' to message_content.
    append '<b>How''s this for sending HTML E-mail from SAP?</b>' to
    message_content.
    append '<p>New paragraph</p>' to message_content.
    append '<p>Apostrophe&#8217s</p>' to message_content.
    Call function to send email - SAPConnect needs to be configured
    call function 'SO_OBJECT_SEND'
      exporting
          object_hd_change = w_object_hd_change
          object_type = 'RAW'
          owner = sy-uname
      tables
          objcont = message_content
          receivers = receiver_list.
    2)
    ABAP CODE
    Email ITAB structure
    DATA: BEGIN OF EMAIL_ITAB OCCURS 10.
            INCLUDE STRUCTURE SOLI.
    DATA: END OF EMAIL_ITAB.
    DATA: T_EMAIL LIKE SOOS1-RECEXTNAM.  "EMail distribution list
    CONSTANTS: C_EMAIL_DISTRIBUTION LIKE SOOS1-RECEXTNAM VALUE
               ‘[email protected],[email protected]’.
    Initialization
    REFRESH EMAIL_ITAB.
    Populate data
    EMAIL_ITAB-LINE = ‘Email body text 1’.
    APPEND EMAIL_ITAB.
    EMAIL_ITAB-LINE = ‘Email body text 2’.
    APPEND EMAIL_ITAB.
    T_EMAIL = C_EMAIL_DISTRIBUTION.
    --- EMAIL FUNCTION ---------------------------------------------------
    REQUIRMENTS:
    1) The user running the program needs a valid email address in their
       address portion of tx SU01 under external comms -> SMTP -> internet
       address.
    2) A job called SAP_EMAIL is running with the following parameters:
       Program: RSCONN01  Variant: INT   User: XXX
       This program moves mail from the outbox to the mail server using
       RFC destination: SAP_INTERNET_GATEWAY_SERVER
    INTERFACE:
    1) APPLICATION: Anything
    2) EMAILTITLE:  EMail subject
    3) RECEXTNAM:   EMail distribution lists separated by commas
    4) TEXTTAB:     Internal table for lines of the email message
    EXCEPTIONS:
    Send OK = 0 otherwise there was a problem with the send.
        CALL FUNCTION 'Z_SEND_EMAIL_ITAB'
             EXPORTING
                  APPLICATION = 'EMAIL'
                  EMAILTITLE  = 'Email Subject'
                  RECEXTNAM   = T_EMAIL
             TABLES
                  TEXTTAB     = EMAIL_ITAB
             EXCEPTIONS
                  OTHERS      = 1.
    Function Z_SEND_EMAIL_ITAB
    ""Local interface:
    *"       IMPORTING
    *"             VALUE(APPLICATION) LIKE  SOOD1-OBJNAM
    *"             VALUE(EMAILTITLE) LIKE  SOOD1-OBJDES
    *"             VALUE(RECEXTNAM) LIKE  SOOS1-RECEXTNAM
    *"       TABLES
    *"              TEXTTAB STRUCTURE  SOLI
    *- local data declaration
      DATA: OHD    LIKE SOOD1,
            OID    LIKE SOODK,
            TO_ALL LIKE SONV-FLAG,
            OKEY   LIKE SWOTOBJID-OBJKEY.
      DATA: BEGIN OF RECEIVERS OCCURS 0.
              INCLUDE STRUCTURE SOOS1.
      DATA: END OF RECEIVERS.
    *- fill odh
      CLEAR OHD.
      OHD-OBJLA    = SY-LANGU.
      OHD-OBJNAM   = APPLICATION.
      OHD-OBJDES   = EMAILTITLE.
      OHD-OBJPRI   = 3.
      OHD-OBJSNS   = 'F'.
      OHD-OWNNAM   = SY-UNAME.
    *- send Email
      CONDENSE RECEXTNAM NO-GAPS.
      CHECK RECEXTNAM <> SPACE AND RECEXTNAM CS '@'.
    *- for every individual recipient send an Email
    (see OSS message 0120050409/0000362105/1999)
      WHILE RECEXTNAM CS ','.
        PERFORM INIT_REC TABLES RECEIVERS.
        READ TABLE RECEIVERS INDEX 1.
        RECEIVERS-RECEXTNAM = RECEXTNAM+0(SY-FDPOS).
        ADD 1 TO SY-FDPOS.
        SHIFT RECEXTNAM LEFT BY SY-FDPOS PLACES.
        MODIFY RECEIVERS INDEX 1.
        PERFORM SO_OBJECT_SEND_REC
         TABLES TEXTTAB RECEIVERS
          USING OHD.
      ENDWHILE.
    *- check last recipient in recipient list
      IF RECEXTNAM <> SPACE.
        PERFORM INIT_REC TABLES RECEIVERS.
        READ TABLE RECEIVERS INDEX 1.
        RECEIVERS-RECEXTNAM = RECEXTNAM.
        MODIFY RECEIVERS INDEX 1.
        PERFORM SO_OBJECT_SEND_REC
         TABLES TEXTTAB RECEIVERS
          USING OHD.
      ENDIF.
    ENDFUNCTION.
          FORM SO_OBJECT_SEND_REC                                       *
    FORM  SO_OBJECT_SEND_REC
    TABLES  OBJCONT      STRUCTURE SOLI
            RECEIVERS    STRUCTURE SOOS1
    USING   OBJECT_HD    STRUCTURE SOOD1.
      DATA:   OID     LIKE SOODK,
              TO_ALL  LIKE SONV-FLAG,
              OKEY    LIKE SWOTOBJID-OBJKEY.
      CALL FUNCTION 'SO_OBJECT_SEND'
           EXPORTING
                EXTERN_ADDRESS             = 'X'
                OBJECT_HD_CHANGE           = OBJECT_HD
                OBJECT_TYPE                = 'RAW'
                OUTBOX_FLAG                = 'X'
                SENDER                     = SY-UNAME
           IMPORTING
                OBJECT_ID_NEW              = OID
                SENT_TO_ALL                = TO_ALL
                OFFICE_OBJECT_KEY          = OKEY
           TABLES
                OBJCONT                    = OBJCONT
                RECEIVERS                  = RECEIVERS
           EXCEPTIONS
                ACTIVE_USER_NOT_EXIST      = 1
                COMMUNICATION_FAILURE      = 2
                COMPONENT_NOT_AVAILABLE    = 3
                FOLDER_NOT_EXIST           = 4
                FOLDER_NO_AUTHORIZATION    = 5
                FORWARDER_NOT_EXIST        = 6
                NOTE_NOT_EXIST             = 7
                OBJECT_NOT_EXIST           = 8
                OBJECT_NOT_SENT            = 9
                OBJECT_NO_AUTHORIZATION    = 10
                OBJECT_TYPE_NOT_EXIST      = 11
                OPERATION_NO_AUTHORIZATION = 12
                OWNER_NOT_EXIST            = 13
                PARAMETER_ERROR            = 14
                SUBSTITUTE_NOT_ACTIVE      = 15
                SUBSTITUTE_NOT_DEFINED     = 16
                SYSTEM_FAILURE             = 17
                TOO_MUCH_RECEIVERS         = 18
                USER_NOT_EXIST             = 19
                X_ERROR                    = 20
                OTHERS                     = 21.
      IF SY-SUBRC <> 0.
        RAISE OTHERS.
      ENDIF.
    ENDFORM.
          FORM INIT_REC                                                 *
    FORM INIT_REC TABLES RECEIVERS STRUCTURE SOOS1.
      CLEAR RECEIVERS.
      REFRESH RECEIVERS.
      MOVE SY-DATUM  TO RECEIVERS-RCDAT .
      MOVE SY-UZEIT  TO RECEIVERS-RCTIM.
      MOVE '1'       TO RECEIVERS-SNDPRI.
      MOVE 'X'       TO RECEIVERS-SNDEX.
      MOVE 'U-'      TO RECEIVERS-RECNAM.
      MOVE 'U'       TO RECEIVERS-RECESC.
      MOVE 'INT'     TO RECEIVERS-SNDART.
      MOVE '5'       TO RECEIVERS-SORTCLASS.
      APPEND RECEIVERS.
    ENDFORM.
    3)
    DATA: OBJPACK   LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
      DATA: OBJHEAD   LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
      DATA: OBJBIN    LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
      DATA: OBJTXT    LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
      DATA: RECLIST   LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.
      DATA: DOC_CHNG  LIKE SODOCCHGI1.
      DATA: TAB_LINES LIKE SY-TABIX.
      DATA L_NUM(3).
    Creation of the document to be sent
    File Name
      DOC_CHNG-OBJ_NAME = 'SENDFILE'.
    Mail Subject
      DOC_CHNG-OBJ_DESCR = 'Delivered Mail'.
    Mail Contents
      OBJTXT = 'Object text'.
      APPEND OBJTXT.
      DESCRIBE TABLE OBJTXT LINES TAB_LINES.
      READ TABLE OBJTXT INDEX TAB_LINES.
      DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
    Creation of the entry for the compressed document
      CLEAR OBJPACK-TRANSF_BIN.
      OBJPACK-HEAD_START = 1.
      OBJPACK-HEAD_NUM = 0.
      OBJPACK-BODY_START = 1.
      OBJPACK-BODY_NUM = TAB_LINES.
      OBJPACK-DOC_TYPE = 'RAW'.
      APPEND OBJPACK.
    Creation of the document attachment
      LOOP AT ITAB_DATA.
        CONCATENATE ITAB_DATA-PRODUCTOR
                    ITAB_DATA-VBELN
                    ITAB_DATA-POSNR
                    ITAB_DATA-MATNR INTO OBJBIN.
        APPEND OBJBIN.
      ENDLOOP.
      DESCRIBE TABLE OBJBIN LINES TAB_LINES.
      OBJHEAD = 'ORDERS'.
      APPEND OBJHEAD.
    Creation of the entry for the compressed attachment
      OBJPACK-TRANSF_BIN = 'X'.
      OBJPACK-HEAD_START = 1.
      OBJPACK-HEAD_NUM   = 1.
      OBJPACK-BODY_START = 1.
      OBJPACK-BODY_NUM   = TAB_LINES.
      OBJPACK-DOC_TYPE   = 'TXT'.
      OBJPACK-OBJ_NAME   = 'WEBSITE'.
      OBJPACK-OBJ_DESCR  = 'ORDERS.TXT'.
      OBJPACK-DOC_SIZE   = TAB_LINES * 255.
      APPEND OBJPACK.
    Completing the recipient list
    target recipent
      clear RECLIST.
      RECLIST-RECEIVER = '[email protected]'.
      RECLIST-EXPRESS  = 'X'.
      RECLIST-REC_TYPE = 'U'.
      APPEND RECLIST.
    copy recipents
      clear RECLIST.
      RECLIST-RECEIVER = '[email protected]'.
      RECLIST-EXPRESS  = 'X'.
      RECLIST-REC_TYPE = 'U'.
      RECLIST-COPY     = 'X'.
      APPEND RECLIST.
    Sending the document
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
                DOCUMENT_DATA              = DOC_CHNG
           TABLES
                PACKING_LIST               = OBJPACK
                OBJECT_HEADER              = OBJHEAD
                CONTENTS_BIN               = OBJBIN
                CONTENTS_TXT               = OBJTXT
                RECEIVERS                  = RECLIST
           EXCEPTIONS
                TOO_MANY_RECEIVERS         = 1
                DOCUMENT_NOT_SENT          = 2
                OPERATION_NO_AUTHORIZATION = 4
                OTHERS                     = 99.
    ENDFORM.                    " SEND_MAIL
    Thanks & Regards
    Sreeni

  • How to edit the cube with new fields without changing historical  in BI 7.0

    HI,
    I have requirment that need to edit cube with new fields and without changing historical data on it.
    Please some one can advise me abt the above scenario.
    Note:I am using BI7.0

    hi Krish,
    In BI 7.0,
    we cannot add a characteristic to an existing dimension if the data is not deleted from the cube.
    It can go to a new dimension and that will not change the existing structure of the cube tables, but will just add to it (as another dim table).  or use remodeling.
    for more details, please seach threads.....
    with hopes
    ARS

Maybe you are looking for