Help with ABAP

I need some help with some ABAP.
I have a date value which is for example 01.01.2008.  I want to store it in a DATS info object which is of length 8.  How can I strip out the . in a transformation rule and should this logic be written in a START routine.
Thanks

Thanks for this.
the description for PDATE mentions an input value of DD/MM/YYYY, you would'nt know whether / could also mean . and/or how can I see the logic before PDATE?
Another problem encountered - since the field is referencing 0DATE (by default for DATS fields) I cannot make changes to the conversion exit or info object transfer routine
Edited by: Niten Shah on May 28, 2008 2:05
Okay have found the Function Modules behind the conversion routines:
CONVERSION_EXIT_xxxxx_INPUT
CONVERSION_EXIT_xxxxx_OUTPUT
Edited by: Niten Shah on May 28, 2008 2:10 PM

Similar Messages

  • Help with ABAP Structure to XML - Simple Transformation

    Hi guys,
    I need help with a Simple Transformation. I am trying to convert a structure in ABAP to XML String but i ma getting short dumps...
    Can any of you help.
    Thanks in advance.
    *& Report  ZTESTXML
    REPORT  ZTESTXML.
    class demo DEFINITION.
       PUBLIC SECTION.
       CLASS-METHODS main.
       ENDCLASS.
       CLASS demo IMPLEMENTATION.
         method main.
           data : begin of account,
                    partner type bu_partner,
                    primary(1),
                    update(3),
                    email(50),
                    memberid(4),
                    telephone(12),
                    fax(10),
                    dept(20),
                    end of account.
            data : xmlstr type xstring.
                    account-partner = '12345'.
                    account-primary = 'N'.
                    account-update = 'Yes'.
                    account-email = 'zz at hotmail.com'.
                    account-memberid = '555'.
                    account-telephone = '123-448-6710'.
                    account-fax = '345-123-7899'.
                    account-dept = 'Info Systems'.
                    call TRANSFORMATION ztest_inttable
                                        SOURCE account = 'account'
                                        result XML xmlstr.
           call FUNCTION 'DISPLAY_XML_STRING'
               EXPORTING xml_string = xmlstr.
           ENDMETHOD.
           ENDCLASS.
           start-of-SELECTION.
             demo=>main( ).
    Transformation
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
      <tt:root name="account"/>
      <tt:template>
        <IGT_CRM_AccountInfo>
          <Account>
            <tt:ref name=".account">
              <tt:attribute name="Id" value-ref="PARTNER"/>
              <tt:attribute name="Primary" value-ref="primary"/>
              <tt:attribute name="Update" value-ref="update"/>
              <Contact>
                <tt:attribute name="EMail" value-ref="email"/>
                <tt:attribute name="Member Id" value-ref="memberid"/>
              </Contact>
              <Communications>
                <tt:attribute name="Telephone" value-ref="telephone"/>
                <tt:attribute name="Fax" value-ref="fax"/>
              </Communications>
              <IGT>
                <tt:attribute name="Department" value-ref="dept"/>
              </IGT>
            </tt:ref>
          </Account>
        </IGT_CRM_AccountInfo>
      </tt:template>
    </tt:transform>
    Dump message
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_ST_REF_ACCESS', was not caught in
    procedure "MAIN" "(METHOD)", nor was it propagated by a RAISING clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    The goal was to access variable "PARTNER". However, this access was not
    possible.

    to convert abap itab or variable into xml string use ABAP key word call transformation.
    call transformation (`ID`)
                source output = itab[]
                result xml xml_out.
    where itab is your internal table or any abap variable.
    xml_out is type string which will hold the resulting xml.
    ID is the transformation program. if you wanto use your own transformation, use your XSLT or ST program there.
    Raja

  • Help with ABAP PLEASE

    Dear BW Experts,
    When we run this ABC quarter report,  it returns values of 12 months of actuals, 12 months of forecast, and quarter one, two, three and four results. Where the quarter 1, 2, 3, 4 is to add 3 months of actuals and 3 months of forecast.
    Usually depending on the forecast version you enter, like for eg. for forecast version F04, the report returns, 4 months of actuals with values and rest of the 8 months 0 value, and for Forecast values it returns 4 months of 0 value and 8 months of forecast. From this, results, the Q1 result would be = 3 months of actuals (Jan, feb, mar) + 3 months of Forecast (Jan, feb, mar).
    Since the 3 months of forecast (Jan, feb, mar) is 0, it should add up the 3 months of actuals (Jan, feb, mar).
    The following is the code we have currently, and the ABAP resource gave us the following but it's not working, it only returns the first month January's values when i use this variable, however we are not able to point out where the concern is...I was hoping if you could help please. My background in ABAP is very limited, so any suggestions you have would be appreciated.
    WHEN 'ZPOPERQ1'.
        IF I_STEP = 2.
          CLEAR L_S_RANGE.
          LOOP AT i_t_var_range INTO loc_var_range
               WHERE vnam = 'ZPROJVER' or vnam = 'ZFORVERS'.
            if loc_var_range-low+1(2) = '01'.
                l_s_range-low = '000'.
                l_s_range-high = '000'.
            else.
                l_s_range-low = '001'.
                if loc_var_range-low+1(2) = '02'.
                    l_s_range-high = '001'.
                elseif loc_var_range-low+1(2) = '03'.
                    l_s_range-high = '002'.
                else.
                    l_s_range-high = '003'.
                endif.
            endif.
            l_s_range-sign = 'I'.
            l_s_range-opt  = 'EQ'.
            APPEND l_s_range TO e_t_range.
          endloop.
        ENDIF.

    Hi Edwin,
    i changed the variable to what you suggested then saved and activated the zxrsru01. I then ran the report, which aborts with the following message...
    "ABORT ERROR FOR VARIABLE IN CUSTOMER ENHANCEMENT ZPOPERQ1"
    Can you please suggest if there is anything else that needs to be changed.
    Thank you...

  • Need help with ABAP coding using java

    Dear experts,
    I have used ABAP to code many reports/function modules.However as i know java quite well,i want to achieve the same using java.I have utilized JCO to retrieve information from RFC in this mission.
    However i realized that i had to code all things using ABAP and use java only as interface to connect to
    SAP fetch that module and display information on console.It was not that fun.
    I want that i should not Login to SAP but work only using java.
    I heard SAP Netweaver is a good choice.But i dont know much about it.Will i be able to develop reports only by java and how ?
    Plz suggest.

    hi,
    I hope that you already have the J2ME Toolkit and that your emulator works okay. In the toolkit you get several examples to show you how to program a MIDlet. One has to do with a HTTP client server connection. Also in the API documentation for the J2ME there is a Connector class that you used to set up this communication and in the description of this class it pretty thoroughly explains how to set up an HTTP protocol client.
    However, if you want to do some other kind of networking then you are pretty much out of luck, as the TCPIP socket protocol has not been fully implemented and is optional to the J2ME specifications, only the HTTP protocol is certain to be available. This means that mobile phone companies can add other networking functionality to their phone's java virtual machine if they feel like it. This is a bummer I know.
    I hope this helps.
    Cheers,
    Mark

  • Help with abap code in Transformation

    Hi Experts,
    we have a scenario where we load delta data from an DSO into a Cube.
    The records in the DSO looks like below.
    Location as (L)
    WorkOrder as (W)
    Startdate(DDMMYYYY)/time (HH:MM:SS) as (S)
    Finishdate/time as (F)
    L1
    W1
    21/04/2009/10:00:00
    21/04/2009/12:00:00
    L1
    W2
    21/04/2009/14:00:00
    21/04/2009/23:00:00
    || L1 ||W3||  21/04/2009/16:00:00 ||21/04/2009/20:00:00 || 
    Total time ( April 2009 ) for above Location L1 should be calculated as a difference between W1 and W2 since W3 is a overlapping record. So the result would be 13 Hrs. Work Orders are summarised, so we dont need work order info in the output.
    Can you experts help me with the code to implement??
    Thanks,
    DV

    For each location, for example L1, move the records to an internal table itab.
    sort itab by startdate.
    read table itab index 1. 
    You will get the first value.
    sort itab by finishdate descending.
    read table itab index 1.
    you will get the second value.
    Calculate the difference and populate it to the internal table.
    finally modify the source package.
    I have just given the logic.  I hope you can build upon this.
    I hope it helps.
    Thanks.

  • Help with ABAP code in CMOD.

    dear all,
    can you help me solve the below abap coding problem? thanks.
    somewhere at the top
    DATA: L_S_RANGE LIKE LINE OF E_T_RANGE.
    DATA: L_S_VAR_RANGE LIKE E_T_RANGE.
          LOOP AT I_T_VAR_RANGE INTO L_S_VAR_RANGE. <-- error msg stops here.
            FIND l_s_var_range-vnam IN TABLE it_vnam.
            IF sy-subrc = 0.
              l_check = 'X'.
              EXIT.
            ENDIF.
          ENDLOOP.
    Error message...
    "L_S_VAR_RANGE" cannot be converted to the line type of "I_T_VAR_RANGE".
    Thanks all.

    Hi Try this,
    DATA: L_S_RANGE LIKE LINE OF E_T_RANGE.
    DATA: L_S_VAR_RANGE LIKE LINE OF  I_T_VAR_RANGE .
    LOOP AT I_T_VAR_RANGE INTO L_S_VAR_RANGE. <-- error msg stops here.
            FIND l_s_var_range-vnam IN TABLE it_vnam.
            IF sy-subrc = 0.
              l_check = 'X'.
              EXIT.
            ENDIF.
          ENDLOOP.
    Regards,
    Ravi

  • Help with abap proxies !!

    Hi Friendz,
    I am working on a scenario where a report is fetching data from a table which has around 2,00,000 records and passing this to an abap proxy to pass the data into XI and then XI creates a file out of this data. The scenario is working fine for smaller amount of data but throws a
    short dump when it encounters a large amnount of data like 2-3 Lacs records.
    The dump I am facing is SYSTEM_NO_ROLL.
    Please suggest what can be the cause or if you want me to show the report, whichh triggers the proxy.
    Thanks.

    Hi Friends,
    Thank you very much for your replies. The program is as follows :
    report  yorder_spp_upload no standard page heading.
    tables : vbak,
             yorderspp,
             vapma,
             yspp_fscloc.
    data : it_items type table of ymat_order_spp with header line.
    types : begin of ty_vapma,
              matnr type vapma-matnr,
              vkorg type vapma-vkorg,
              audat type vapma-audat,
              bstnk type vapma-bstnk,     "PO Number
              vbeln type vapma-vbeln,
              posnr type vapma-posnr,
            end of ty_vapma.
    data : it_vapma type table of ty_vapma,
           wa_vapma like line of  it_vapma.
    types : begin of ty_vbap,
              vbeln  type vbap-vbeln,
              posnr  type vbap-posnr,
              matnr  type vbap-matnr,
              kwmeng type vbap-kwmeng,
              meins  type vbap-meins,
              pstyv  type vbap-pstyv,
              werks  type vbap-werks,
            end of ty_vbap.
    data : it_vbap type table of ty_vbap,
           wa_vbap like line of  it_vbap.
    types : begin of ty_final,
        crmordqtyv   type vbap-kwmeng,
        crmpgidatw   type vbap-erdat,
        crm_facloc   type vbap-werks,
        crm_fstloc   type vbap-werks,
        crm_itcrat   type vbap-erdat,
        crm_itmtyp   type vbap-pstyv,
        crm_order    type vbap-vbeln,
        crm_numint   type vbap-posnr,
        crm_ohguid   type vapma-bstnk,
        crm_reqdat   type vbap-erdat,
        crm_shipto   type vbak-kunnr,
        crm_prod_id  type vbap-matnr,
        crm_doctyp   type vapma-vkorg,
        end of ty_final.
    data : it_final type table of ty_final.
    data : wa_final like line of it_final.
    data : ydate type sy-datum.
    data: i_options like rfc_db_opt occurs 0,
          i_fields  like rfc_db_fld occurs 0,
          i_data    like tab512 occurs 0,
          i_table_name like dd02l occurs 0 with header line.
    data : it_orderspp type table of yorderspp,
           wa_orderspp type yorderspp.
    data : prxy type ref to zeccsppco_mi_ecc_spp_ob.
    data : m_data type zeccsppmt_ecc_to_spp_ib,
           s_data type zeccsppmt_ecc_to_spp_ib,
           w_data type zeccsppdt_ecc_to_spp_ib_row,
           t_data type zeccsppdt_ecc_to_spp_ib_ro_tab.
    data : l_date type datum,
           f_date type datum.
    selection-screen begin of block b1 with frame.
    select-options : s_matnr for vapma-matnr,
                     s_audat for vapma-audat,
                     s_werks for vapma-werks,
                     s_auart for vapma-auart,
                     s_vkorg for vapma-vkorg.
    selection-screen end of block b1.
    start-of-selection.
      perform select_data_upload_table.
      perform read_data.
    *&      Form  select_data_upload_table
          text
    form select_data_upload_table.
    delete all the data from table "yorderspp".
      delete from yorderspp.
      commit work.
      wait up to 2 seconds.
    If Input s_audat(Order date) is initial, It will fetch last Calendar months data.
      if s_audat[] is initial.
        call function 'OIL_LAST_DAY_OF_PREVIOUS_MONTH'
          exporting
            i_date_old = sy-datum
          importing
            e_date_new = l_date.
        concatenate l_date+0(6) '01' into f_date.
        s_audat-low = f_date.
        s_audat-high = l_date.
        s_audat-option = 'BT'.
        s_audat-sign = 'I'.
        append s_audat.
      endif.
    Selection of order no and respective items from table VAPMA.
      select matnr vkorg audat bstnk vbeln posnr werks
             into  corresponding fields of table it_vapma
             from  vapma
             where matnr in s_matnr
               and vkorg in s_vkorg
               and auart in s_auart
               and werks in s_werks
               and audat in s_audat.
    Selection of data based on order number from table VBAP.
      if not it_vapma[] is initial.
        select vbeln posnr matnr kwmeng meins pstyv werks
               into corresponding fields of table it_vbap
               from vbap
               for all entries in it_vapma
               where vbeln = it_vapma-vbeln
                 and posnr = it_vapma-posnr
                 and pstyv = 'ZTAN'
                 and werks in s_werks.
      endif.
      loop at it_vapma into wa_vapma.
        read table it_vbap into wa_vbap with key vbeln = wa_vapma-vbeln
                                                 posnr = wa_vapma-posnr
                                                 matnr = wa_vapma-matnr.
        if sy-subrc = 0.
          select single * from vbak where vbeln = wa_vbap-vbeln.
          yorderspp-crm_entdt   = sy-datum.
          yorderspp-crm_order   = wa_vbap-vbeln.
          yorderspp-crm_numint  = wa_vbap-posnr.
          yorderspp-crmordqtyv  = wa_vbap-kwmeng.
          yorderspp-crmpgidatw  = wa_vapma-audat.
          yorderspp-crm_facloc  = wa_vbap-werks.
          yorderspp-crm_fstloc  = wa_vbap-werks.
          yorderspp-crm_itcrat  = wa_vapma-audat.
          yorderspp-crm_itmtyp  = wa_vbap-pstyv.
          yorderspp-crm_ohguid  = wa_vapma-bstnk.
          yorderspp-crm_reqdat  = wa_vapma-audat.
          yorderspp-crm_shipto  = vbak-kunnr.
          yorderspp-crm_prod_id = wa_vbap-matnr.
          yorderspp-crm_doctyp  = wa_vapma-vkorg.
          insert yorderspp.
          commit work.
        endif.
      endloop.
      wait up to 5 seconds.
    endform.                    "select_data_upload_table
    *&      Form  READ_DATA
          text
    form read_data.
      select * from yorderspp into  table it_orderspp.
      if sy-subrc = 0.
        create object prxy.
        loop at it_orderspp into wa_orderspp.
          select single * from yspp_fscloc where s_vkorg = wa_orderspp-crm_doctyp
                                             and s_werks = wa_orderspp-crm_fstloc.
          if sy-subrc = 0.
            wa_orderspp-crm_facloc = yspp_fscloc-s_facloc.
            wa_orderspp-crm_fstloc = yspp_fscloc-s_fstloc.
          else.
            select single * from yspp_fscloc where s_vkorg = wa_orderspp-crm_doctyp
                                               and s_werks = space.
            if sy-subrc = 0.
              wa_orderspp-crm_facloc = yspp_fscloc-s_facloc.
              wa_orderspp-crm_fstloc = yspp_fscloc-s_fstloc.
            else.
              wa_orderspp-crm_facloc = wa_orderspp-crm_fstloc.
            endif.
          endif.
          w_data-crmordqtyv = wa_orderspp-crmordqtyv.
          w_data-crmpgidatw = wa_orderspp-crmpgidatw.
          w_data-crm_facloc = wa_orderspp-crm_facloc.
          w_data-crm_fstloc = wa_orderspp-crm_fstloc.
          w_data-crm_itcrat = wa_orderspp-crm_itcrat.
          w_data-crm_itmtyp = wa_orderspp-crm_itmtyp.
          w_data-crm_numint = wa_orderspp-crm_numint.
          w_data-crm_ohguid = wa_orderspp-crm_ohguid.
          w_data-crm_reqdat = wa_orderspp-crm_reqdat.
          w_data-crm_shipto = wa_orderspp-crm_shipto.
          w_data-crmprod_id = wa_orderspp-crm_prod_id.
          append w_data to t_data.
          clear w_data.
        endloop.
        s_data-mt_ecc_to_spp_ib-row = t_data.
        m_data = s_data.
        try.
            call method prxy->execute_asynchronous
              exporting
                output = s_data.
            commit work.
          catch cx_ai_system_fault .
            data fault type ref to cx_ai_system_fault .
            create object fault.
            write :/ fault->errortext.
        endtry.
      endif.
    endform.                    "READ_DATA

  • Help with Abap Querys!!!!

    Hi all,
    i have to create a z transaction for an abap querys but the queries are in the productive system but not in the quality and development system. Any body know how to put a z transaction for that queries???.

    as u know  ABAP Query is Client Dependent , So Create Tcode in DEV with the same name of Query of PRO.In that case u cannt test this one in DEV and QAs.
    Regards
    Prabhu

  • Help with ABAP Routine

    Hello All!
    I am getting data from Oracle into BW. One of the tables has 7 Objects. I am creating Info Objects as data targets and using the update rules to map the description of each of the object. For example:
    Zip Code (With master data and no text)            State    (With no master data but with text- 0TXTSH)
    Country  (With no master data but with text-0TXTMD)
    I am able to to load this fine as there are only two objects with description. The problem is when I have 6 objects with description and I can only map 3 of them to 0txtsh, 0txtmd,and 0txtlg.
    How do I write the routine so that I can map all the descriptions of respective objects to 0TXTMD.
    Please suggest.
    Thanks for everybody's time.

    You don't necessarily have to use the 0TXT* objects as source. You could add your own objects (e.g. CTXT*) to the InfoSource and map these to the texts for the different InfoObjects correspondingly.
    If for some reason you don't want to do that you could still create 6 different DataSources (reading from the same table) and do all the mapping independently (which is a worse solution compared to the above but still possible.)
    Regards, Klaus

  • Need Help With Simple ABAP Code

    Hello,
    I'm loading data from a DSO (ZDTBMAJ) to an Infocube (ZCBRAD06). I need help with ABAP code to some of the logic in Start Routine. DSO has 2 fields: ZOCTDLINX & ZOCBRDMAJ.
    1. Need to populate ZOCPRODCD & ZOCREFNUM fields in Infocube:
        Logic:-
        Lookup /BI0/PMATERIAL, if /BIC/ZOCBRDMAJ = /BIC/OIZOCBRDMAJ
        then /BIC/ZOCPRODCD = ZOCPRODCD in Infocube
               /BIC/ZOCREFNUM = ZOCREFNUM in Infocube         
    2. Need to populate 0G_CWWTER field in Infocube:
        Logic:
        Lookup /BIC/PZOCTDLINX, if /BIC/ZOCTDLINX = BIC/OIZOCTDLINX
        then G_CWWTER = 0G_CWWTER in Infocube.
    I would need to read single row at a time.
    Thanks!

    I resolved it.

  • F4 Help with text table in WD abap

    Hi,
    i am using country related input help with check table T005 in one of table and i want to display the country text along with country id in my table, f4 for country is coming however if i select country from f4 it showing country id in the input field of table.
    i want to have country text also in one of my input fields in the table, i have seen f4 help works if we have explicit search help and using parameter assignment we can have id and text defaulted if we use same context for id and text fields,  however in this case country table t005 has check table t005 where texts are stored in text table t005t so web dynpro abap is't picking up the texts??
    please suggest how can i get the texts as soon as i select country in the f4??

    Hi Kranthi,
    You merely have to have an internal table storing list of countries, which you only need to do once, e.g. on load of application (method WDDOINIT of COMPONENTCONTROLLER). In your view, you have to declare a method for event onEnter of the input field, but this method doesn't have to have any code. Your code will be in method WDDOBEFOREACTION, where you read get country name from country key. Once you've got country name, transfer value to a context attribute to which you've already mapped as a source for attribute value of the UI element.
    Check out SAP Webdynpro component FITV_IMG_DEFHTLCATA -> view V_ITEM.

  • Need help with Desktop Office Integration (DOI)

    Hi all,
    i need help to read an Excelsheet into an int. table.
    Its the first time, that i use the SAP DOI. I copy different coding into my Report to get connection to an existing Excelsheet.
    Here is my Coding:
    * first get the SAP DOI i_oi_container_control interface
      CALL METHOD c_oi_container_control_creator=>get_container_control
                        IMPORTING control = gr_control
                                  error   = gr_errors.
      APPEND gr_errors.
    * create a control container as defined in dynpro 100
      CREATE OBJECT gr_container
                EXPORTING container_name = 'CONTAINER'.
    * initialize the SAP DOI Container, tell it to run in the container
    * specified above and tell it to run Excel in-place
      CALL METHOD gr_control->init_control
        EXPORTING
          r3_application_name      =    'Data'
          inplace_enabled          = ' '
          inplace_scroll_documents = 'X'
          parent                   = gr_container
          register_on_close_event  = 'X'
          register_on_custom_event = 'X'
          no_flush                 = 'X'
        IMPORTING
          error                    = gr_errors.
    * save error object in collection
      APPEND gr_errors.
    * ask the SAP DOI container for a i_oi_document_proxy for Excel
      CALL METHOD gr_control->get_document_proxy
                           EXPORTING document_type = 'Excel.Sheet'
    *                       EXPORTING document_type = 'Word.Document'
                                    no_flush = 'X'
    *                                REGISTER_CONTAINER = 'X'
                          IMPORTING document_proxy = gr_document
                                    error          = gr_errors.
      APPEND gr_errors.
    Then i open the Document from lokal PC.
    CALL METHOD gr_document->open_document
          EXPORTING
    *      document_title   = ld_filenc
            document_url     = ld_verzc
    *      NO_FLUSH         = ' '
    *      OPEN_INPLACE     = ' '
    *      open_readonly    = ' '
    *      PROTECT_DOCUMENT = ' '
    *      STARTUP_MACRO    = ''
    *      USER_INFO        =
    *      ONSAVE_MACRO     =
          IMPORTING
            error            = gr_errors
    *      RETCODE          =
      APPEND gr_errors.
    Now i start the spreadsheet interface:
    *...check if our document proxy can serve a spreadsheet interface  data:
      DATA: pd_has TYPE i.
      CALL METHOD gr_document->has_spreadsheet_interface
                        EXPORTING no_flush = 'X'
                        IMPORTING is_available = pd_has
                                  error = gr_errors.
      APPEND gr_errors.
      CALL METHOD gr_document->get_spreadsheet_interface
                        EXPORTING no_flush = ' '
                        IMPORTING
                                  sheet_interface = gr_spreadsheet
                                  error = gr_errors.
      APPEND gr_errors.
    * now loop through error collection because
    * Get_spreadsheet_interface flushed and synchronized
    * the automation queue !
      LOOP AT gr_errors.
        CALL METHOD gr_errors->raise_message
                        EXPORTING  type     = 'I'
                        EXCEPTIONS message_raised = 1
                                   OTHERS         = 2.
        IF sy-subrc = 1.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          pd_kz_fehler = 'X'.
          EXIT.
        ENDIF.
      ENDLOOP.
      FREE gr_errors.
    Ok, now i can open a Excelsheet, and i can mark a range in the sheet
    rows is a constant.
    CALL METHOD gr_spreadsheet->set_selection
          EXPORTING
            left     = 1
            top      = 2
            rows     = rows
            columns  = 18
    *    NO_FLUSH = ' '
    *    UPDATING = -1
        IMPORTING
          error    = gr_errors
    *    RETCODE  =
    my first problem: Excel is really open, and the user can see the sheet. I dont want, that excel is visible...is there a way to start excel in no_visible mode?
    second problem: The sheet have makro aktiv...at start from excel, there is a popup, which ask 'makros activate' oder not activate...  i dont want this popup... is there a way, to say it from abap, that makros always active?
    third problem: i see, that the content Table have this components:
    TYPES: BEGIN OF SOI_GENERIC_ITEM,
             ROW(4) TYPE C,
             COLUMN(4) TYPE C,
             VALUE(256) TYPE C,
           END OF SOI_GENERIC_ITEM.
    But my excelsheet have more then 10000 lines....
    forth (and biggest) problem: i need the selected data into an int. tabelle. The table have the components:
    ROW
    COL
    VALUE
    i dont know, how can i do this...
    please help me
    Sorry for my bad english.
    Greetings
    Markus

    Hi,
    May be this link is useful
    /people/thomas.jung3/blog/2005/05/11/using-classic-activex-controls-in-the-abap-control-framework
    Also Check out report SAPRDEMOEXCELINTEGRATION2.
    check the links
    http://www.esnips.com/doc/741a848e-f49a-4436-bec4-e21950f6c94c/desktop-office-integration.pdf
    http://www.esnips.com/doc/2080a9ec-64f9-49c4-bd03-d9f56bc2437c/MSWord--Excel-with-ABAP.pdf
    Regards,
    Raj.

  • Creation of IBASE (TA IB51) with ABAP

    Creation of IBASE (TA IB51) with ABAP
    Posted: Sep 29, 2005 8:47 AM      Reply      E-mail this post 
    Hello all,
    i want to create an IBASE with Instances (Materials) with Abap.
    It is possible to create the IBASE but not to create the instances. I have always an empty IBASE without materials.
    Can anybody help me
    Thanks a lot
    Markus
    Here is my coding:
    type-pools ibin .
    type-pools IBCO2.
    data: ibib_handle type i.
    data: E_IBASE_REC TYPE IBCO2_IBASE_REC.
    data: I_IBIB1 LIKE IBIB1.
    data: I_IBIBT1 LIKE IBIBT1.
    data: matobject type ref to cl_ibase_r3_material.
    data: i_PROCESS_REC TYPE IBXX_PROCESS_REC.
    data: C_INSTANCE_TAB TYPE IBCO1_INST_TAB1.
    data: c_inst_struct type ibco1_inst_rec1.
    CALL FUNCTION 'IB_COM_NEW'
    IMPORTING
    E_IBCO_HANDLE = ibib_handle.
    CALL FUNCTION 'IB_COM2_CREATE_IBASE'
    EXPORTING
    I_IBCO_HANDLE = ibib_handle
    I_IBTYP = 'Y1'
    IMPORTING
    E_IBASE_REC = E_IBASE_REC
    EXCEPTIONS
    IB_HANDLE_NOT_DEFINED = 1
    OTHERS = 2.
    clear: i_ibib1, i_ibibt1.
    move-corresponding e_ibase_rec-com to i_ibib1.
    move-corresponding e_ibase_rec-conf to i_ibib1.
    i_ibib1-ibase = e_ibase_rec-ibase.
    i_ibib1-extid = 'externer Name'.
    *i_ibib1-authg = 'E001'.
    i_ibibt1-ibase = e_ibase_rec-ibase.
    i_ibibt1-langu = sy-langu.
    i_ibibt1-descr = 'Beschreibung'.
    CALL FUNCTION 'IB_COM1_CHANGE_IBASE_ONLY'
    EXPORTING
    I_IBCO_HANDLE = ibib_handle
    I_IBIB1 = i_ibib1
    I_IBIBT1 = i_ibibt1
    EXCEPTIONS
    IB_HANDLE_NOT_DEFINED = 1
    OTHERS = 2.
    create object matobject exporting i_matnr = '000000000000602028'.
    clear i_process_rec.
    i_process_rec-activity = '1'.
    i_process_rec-ind_valfr = 'X'.
    i_process_rec-ind_valto = 'X'.
    i_process_rec-ind_sortf = 'X'.
    i_process_rec-ind_amount = 'X'.
    i_process_rec-ind_unit = 'X'.
    i_process_rec-ind_objtyp = 'X'.
    i_process_rec-ind_objid = 'X'.
    i_process_rec-ind_serno = 'X'.
    i_process_rec-ind_plant = 'X'.
    i_process_rec-ind_batch = 'X'.
    i_process_rec-ind_revlv = 'X'.
    i_process_rec-ind_deviceid = 'X'.
    i_process_rec-ind_posno = 'X'.
    refresh c_instance_tab.
    c_inst_struct-val-valfr = '20050929080000'.
    c_inst_struct-val-valto = '99991231235959'.
    c_inst_struct-com-amount = 1.
    c_inst_struct-com-unit = 'ST'.
    c_inst_struct-objtyp = '0002'.
    c_inst_struct-object = matobject.
    INSERT c_inst_struct INTO TABLE c_instance_tab.
    CALL FUNCTION 'IB_COM1_PROCESS_INSTANCE'
    EXPORTING
    I_IBCO_HANDLE = ibib_handle
    I_IBASE = e_ibase_rec-ibase
    i_moment = '20050929080000'
    I_PROCESS_REC = i_process_rec
    CHANGING
    C_INSTANCE_TAB = c_instance_tab
    EXCEPTIONS
    IB_HANDLE_NOT_DEFINED = 1
    IB_NO_ACTIVITY = 2
    IB_NOTHING_PROCESSED = 3
    IB_INCONSISTEND_DATA = 4
    IB_INSTALL_NOT_ALLOWED = 5
    OTHERS = 6.
    CALL FUNCTION 'IB_COM_SAVE_AND_FREE'
    EXPORTING
    I_IBCO_HANDLE = ibib_handle
    EXCEPTIONS
    IB_HANDLE_NOT_DEFINED = 1
    IB_NOT_SUCCESSFUL = 2
    OTHERS = 3
    write: e_ibase_rec-ibase.
    commit work.

    Remark: We have SAP R3 Release 4.6c

  • Help with RFC sender, Program And RFC Destination

    Hi!!
    my scenary is asynchronous
         RFC Sender -> SAP-XI -> Oracle reciever
    I have a problem with abap, especially rfc, program and rfc destination. The connection with SAP-XI exist and SAP-XI  receive the message but the message is empty.
    1. In my program on the line
              CALL FUNCTION 'ZBAPI_SD_PED_ORD_SERVIC' DESTINATION 'ZXI_ENVIAR_PED_ORD_SERVIC'
              catch an error system_failure = 2 and it dont execute the rfc ZBAPI_SD_PED_ORD_SERVIC
    2. I rewrite my program, that line to
              CALL FUNCTION 'ZBAPI_SD_PED_ORD_SERVIC' STARTING NEW TASK 'NEW' DESTINATION 'ZXI_ENVIAR_PED_ORD_SERVIC'
              catch an error communication_failure = 1 but the rfc ZBAPI_SD_PED_ORD_SERVIC is executed but no send to SAP-XI
    3. I rewrite my program, that line to
              CALL FUNCTION 'ZBAPI_SD_PED_ORD_SERVIC' IN BACKGROUND TASK DESTINATION 'ZXI_ENVIAR_PED_ORD_SERVIC'
              No error but it dont execute the rfc ZBAPI_SD_PED_ORD_SERVIC and the message in SAP-XI is empty, display the tables but not the row. i check the table PED_ORDEN and RETURN but the controls fields dont are afected.
    What is my Error?
    Where am i making a mistake?
    RFC
    FUNCTION zbapi_sd_ped_ord_servic.
    *"Interfase local
    *"  TABLES
    *"      PED_ORDEN STRUCTURE  ZSD_RFC_T04
    *"      RETURN STRUCTURE  ZSD_RFC_R06
      TABLES: zsd_ped_orden, zsd_rfc_r01.
      DATA: tb_ped_orden LIKE zsd_ped_orden  OCCURS 0 WITH HEADER LINE,
                     tb_rfc_orden_error LIKE zsd_rfc_r01 OCCURS 0 WITH HEADER LINE.
    *Get Pedido by Ordenes
      SELECT  *  INTO CORRESPONDING FIELDS OF TABLE tb_ped_orden
              FROM zsd_ped_orden
              WHERE estatus  EQ  space.
      LOOP AT tb_ped_orden.
        MOVE-CORRESPONDING tb_ped_orden TO ped_orden.
        APPEND ped_orden.
        tb_ped_orden-estatus = 'X'.
        tb_ped_orden-fecha_actualiz = sy-datum.
        tb_ped_orden-hora_actualiz = sy-uzeit.
        MODIFY tb_ped_orden.
      ENDLOOP. 
      MODIFY  zsd_ped_orden FROM TABLE tb_ped_orden.
      COMMIT WORK.
    *Errors in Ordenes
      SELECT  *  INTO CORRESPONDING FIELDS OF TABLE tb_rfc_orden_error
              FROM zsd_rfc_r01
              WHERE estatus  EQ  space.
      LOOP AT tb_rfc_orden_error.
        MOVE-CORRESPONDING tb_rfc_orden_error TO return.
        APPEND  return.
        tb_rfc_orden_error-estatus = 'X'.
        tb_rfc_orden_error-fecha_actualiz = sy-datum.
        tb_rfc_orden_error-hora_actualiz = sy-uzeit.
        MODIFY tb_rfc_orden_error.
      ENDLOOP.
      MODIFY  zsd_rfc_r01 FROM TABLE tb_rfc_orden_error.
      COMMIT WORK.
    ENDFUNCTION.
    PROGRAM
    REPORT  ZBAPI_SD_PED_ORD_SERVIC.
    DATA: ped_orden LIKE ZSD_RFC_T04 OCCURS 0 WITH HEADER LINE,
          return LIKE ZSD_RFC_R06 OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'ZBAPI_SD_PED_ORD_SERVIC' DESTINATION 'ZXI_ENVIAR_PED_ORD_SERVIC'
         TABLES
              ped_orden             = ped_orden
              return                = return
      EXCEPTIONS
        communication_failure = 1
        system_failure        = 2
        OTHERS                = 3.
    IF sy-subrc <> 0.
      MESSAGE 'error' type 'I'.
    ENDIF.
    COMMIT WORK.
    RFC DESTINATION
    RFC Destination: ZXI_ENVIAR_PED_ORD_SERVIC
    Connection TYpe: TCP/IP Connection
    Register Server Program: ZBAPI_SD_PED_ORD_SERVIC
    Gateway host: host00
    Gateway service: sapgw00

    hi
    For rfc sender adapter we hv to do some settings .Please chk whether this settings are well configured or not.
    a) RFC destination
    b) RFC channel in the XI directory
    This weblog is a response to a few question about the basic configuration of the RFC sender adapter
    that were posted on the XI forum (and also on my e-mail)
    So here we go, basically we have to configure 2 things:
    a) RFC destination
    b) RFC channel in the XI directory
    RFC destination:
    1. To create the RFC go to TCODE: SM59
    2. Create new destination of type T (TCP/IP)
    3. Make sure you select Registered Server Program option before writing your program ID
    4. Write you program ID (remember it's case-sensitive)
    5. In the gateway host and gateway service write the values of your "Application system" - business system (not the XI server)
    7. No configuration in the J2EE administrator nessecary
    Now we can proceed to RFC channel configuration:
    1. Enter your Application Server
    2. Your Application Server Service
    3. Enter your Program ID from the RFC destination
    And we're done:)
    Now you can test the RFC destination in SM59 to see if it works.
    Please chk this following link.
    1. RFC Processing with the RFC Adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/25/76cd3bae738826e10000000a11402f/content.htm
    2. Configuring the Sender RFC Adapter -
    http://help.sap.com/saphelp_nw04/helpdata/en/67/6d0540ba5ee569e10000000a155106/content.htm
    3.  /people/swaroopa.vishwanath/blog/2006/12/28/send-rfc-to-sap-xi-150-asynchronous
    regards
    Manas

  • Help on ABAP Function Module (Unit 1)

    Hello ABAP Experts,
    I need help with the below mentioned lesson plan. I donot have source code for The ABAP Function Module - BC401_GET_SEP_STRING. For the Source Code Solution in the Lesson Plan to work, I need the source code for the above mentioned function module.
    The Lesson Plan with Solution is posted below:
    Exercise 1 
    Unit: Data Types and Data Objects in Detail
    Topic: Defining Data Types and Data Objects
    Basic Statements
    Processing Character Strings
    At the conclusion of these exercises, you will be able to:
    u2022     Define structure types locally in the program
    u2022     Define elementary and complex data objects
    u2022     Split strings
    u2022     Use conversion rules
    u2022     Display the contents of data objects in lists
    In this exercise, you will use a template to create a program that receives a single data record from the database table SFLIGHT in form of a character string. The program will split the this character string into its components and display it formatted in a list.
    Because the focus of this exercise is not on the transfer of data as a character string, we will use a function module that will provide us with the required database. This will simulate actual cases, such as data transfer from an external system.
    Program: ZBC401_##_SPLIT_STRING
    Template: SAPBC401_DTOT_SPLIT_STRING
    Model solution: SAPBC401_DTOS_SPLIT_STRING
    is your two-digit group number
    1-1 Copy the program, SAPBC401_DTOT_SPLIT_STRING and give it the new name ZBC401_##_SPLIT_STRING.
    1-2 Familiarize yourself with the main body of the program. Pay special attention to the content of the data object datastring after the function module call. Use the Debugger to do this, and/or display the character string in a list. (The function module itself is here seen as a black box. For this exercise, it is not necessary to understand its construction.)
    1-3 To be able to split the character string into its components you must first remove the ## characters. Remove the two leading separators from the character string first. Then copy the initial part up to the closing separators to the auxiliary variable set_string. For this, set_string has to be defined appropriately.
    1-4 Now use the separators to split the contents of the auxiliary variable set_string into the structure wa_flight_c. The latter is typed with the local program structure type st_flight_c. You still have to comment out the components of this structure type and assign them an appropriate type.
    1-5 As a test, display the fields of the structure, wa_flight_c in a list.
    1-6 In the list displayed in exercise 1-5, you should have observed that some of the fields were displayed without formatting u2013 for example, the PRICE field. Your next step is to change this.
    To do this, convert the data you have extracted by copying it to data objects with suitable types. Also, not all components of wa_flight_c are to be displayed.
    For this purpose, a structure wa_flight has already been defined. It is typed with the structure type st_flight. You must comment out the components of st_flight and find appropriate types for these components for the formatting. Then copy the identically-named components of the character-type structure wa_flight_c to the fields of the structure wa_flight.
    Display the contents of the structure wa_flight in a list. Use the appropriate formatting options for the WRITE statement for the fldate and price components.
    Data Types and Data Objects in Detail Solution 1
    Unit: Data Types and Data Objects in Detail
    Topic: Defining Data Types and Data Objects
    Basic Statements
    Processing Character Strings
    REPORT sapbc401_dtos_split_string.
    TYPES:
    BEGIN OF st_flight_c,
    mandt(3) TYPE c,
    carrid(3) TYPE c,
    connid(4) TYPE n,
    fldate(8) TYPE n,
    price(20) TYPE c,
    currency(5) TYPE c,
    planetype(10) TYPE c,
    seatsmax(10) TYPE n,
    seatsocc(10) TYPE n,
    paymentsum(22) TYPE c,
    seatsmax_b(10) TYPE n,
    seatsocc_b(10) TYPE n,
    seatsmax_f(10) TYPE n,
    seatsocc_f(10) TYPE n,
    END OF st_flight_c,
    BEGIN OF st_flight,
    carrid(3) TYPE c,
    connid(4) TYPE n,
    fldate TYPE d,
    price(9) TYPE p DECIMALS 2,
    currency(5) TYPE c,
    planetype(10) TYPE c,
    seatsmax TYPE i,
    seatsocc TYPE i,
    END OF st_flight.
    DATA:
    datastring TYPE string,
    set_string TYPE string,
    wa_flight_c TYPE st_flight_c,
    wa_flight TYPE st_flight.
    START-OF-SELECTION.
    CALL FUNCTION 'BC401_GET_SEP_STRING'
    EXPORTING
    IM_NUMBER = '1'
    IM_TABLE_NAME = 'SFLIGHT'
    IM_SEPARATOR = '#'
    IM_UNIQUE = 'X'
    IMPORTING
    ex_string = datastring
    EXCEPTIONS
    no_data = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE a038(bc401).
    ENDIF.
    SHIFT datastring BY 2 PLACES.
    FIND '##' IN datastring.
    IF sy-subrc <> 0.
    MESSAGE a702(bc401).
    ENDIF.
    SPLIT datastring AT '##' INTO set_string datastring.
    SPLIT set_string AT '#' INTO
    wa_flight_c-mandt
    wa_flight_c-carrid
    wa_flight_c-connid
    wa_flight_c-fldate
    wa_flight_c-price
    wa_flight_c-currency
    wa_flight_c-planetype
    wa_flight_c-seatsmax
    wa_flight_c-seatsocc
    wa_flight_c-paymentsum
    wa_flight_c-seatsmax_b
    wa_flight_c-seatsocc_b
    wa_flight_c-seatsmax_f
    wa_flight_c-seatsocc_f.
    MOVE-CORRESPONDING wa_flight_c TO wa_flight.
    WRITE: /
    wa_flight-carrid,
    wa_flight-connid,
    wa_flight-fldate DD/MM/YYYY,
    wa_flight-price CURRENCY wa_flight-currency,
    wa_flight-currency,
    wa_flight-planetype,
    wa_flight-seatsmax,
    wa_flight-seatsocc.

    this FM is to get one element value from the XML
    if you want to convert the whole XML use FM SMUM_XML_PARSE
    Regards
    Raja
    Kindly close your previous threads and assing points.
    Re: Creation of SIMPLE TRANSFORMATIO(ST)for deserialisation of XML ->ABAP data.

Maybe you are looking for

  • Mid Month Joining-PF Basis Calculation

    Hi All, I have an emplyee whose joining is in the 3rd week of the month 23.04.2011. His basic is 25000, 8 days working basic is 6667. I want to restrict his PF contribution to PF at 780 his actual contri coming as 800, 12% of basic. Here i want that

  • Firefox wont open webpage when linked from another program

    When linking from other programs, a new firefox window will open, but displaying a blank page instead of loading the page. I checked for firefox being the default web browser, but I cant figure out what other options may be important. It actually sta

  • Target Group by partner function (created BP BUT100)

    Hi forum friends Please I need a help. I want to create a target group by Partner function (BUT100). I have tried to use the join: BUT100(partner field) + BUT0CC(Partner) + BUT051(Partner1) + BUT000(Partner) but it doenst work. How can i do it? Thank

  • N73 connect computer hardly!

    N73 connect computer hardly. After updating to V4.0727.2.2.1, my phone doesn't ask me using what kind of mode to connect .when I use capable to connect computer.

  • Missing styles dropdown in properties

    I have created a new site with a CSS attached. When I click on the style dropdown in the properties menu area, the styles are not there to choose from. The only choices are "none, rename, attach style sheet" The style sheet is already attached (and I