InfoObject Creation Dynamically

Hello Experts,
I need to create thousands of custom infoobjects and trying to implement through BAPI. I am trying to create infoobject reading the infoobject structure from tab delimited tax file:
io_name io_type io_txsht io_txlng io_datatype io_length
ZEA_IO1 CHA IO Test IO Test 1 CHAR 20
ZEA_IO2 CHA IO Test IO Test 2 CHAR 20
I was able to load the text file to internal table. Now I have to work with the following function modules (please check the code):
'BAPI_IOBC_CHANGE' - To get the InfoObject Catalog so that all the infoobject will be created under InfoObject Catalog. What would be the code?
Call Function 'BAPI_IOBJ_CREATE' -
IMPORTING - Is that right?
What to write under EXPORTING to check the error validation one by one?
RETURN = BAPIRET2 ??
Call Function 'BAPI_IOBJ_ACTIVATE_MULTIPLE' - To activate all the infoobjects. What would be the code?
Here is my Code:
*& Report ZBAPI_TEST *
*& InfoObject Creation through BAPI.
*& Read the Text file, call a BAPI to create InfoObjects. *
*& Text file will hold the Info Object Structure. Text file will be *
*& located either work station or local PC.
*& Step 1. Create internal table to hold InfoObject structure *
*& Step 2. Retrieve/Load text file into Internal Table structure *
*& Step 3. Call BAPI Function to Create IO *
*& Step 4. Call BAPI Function to Activate IO *
REPORT ZBAPI_TEST .
Declaring Internal table for creating InfoObject
DATA: p_file TYPE string.
DATA: BEGIN OF itab_bapi OCCURS 0,
io_name like BAPI6108-infoobject,
io_type like BAPI6108-type,
io_txsht like BAPI6108-textshort,
io_txlng like BAPI6108-textlong,
io_datatype like BAPI6108-datatp,
io_length like BAPI6108-intlen,
END OF itab_bapi.
DATA ibapi LIKE STANDARD TABLE OF itab_bapi.
PARAMETERS: sel_file(1500) TYPE c default ' ' OBLIGATORY LOWER CASE.
PUT THE TEXT FILE PATH TO P_FILE
p_file = sel_file.
**Copy the file from the workstation to the server/ internal table**
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = p_file
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
DAT_MODE = SPACE
CODEPAGE = SPACE
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
READ_BY_LINE = 'X'
IMPORTING
FILELENGTH =
HEADER =
TABLES
data_tab = itab_bapi[]
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
not_supported_by_gui = 17
error_no_gui = 18
OTHERS = 19.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
MESSAGE e012(zea_spms) WITH 'Method' 'GUI_UPLOAD' sy-subrc.
&1 &2 issued return code &3
ENDIF.
loop at itab_bapi.
write: /5 itab_bapi-io_name,
20 itab_bapi-io_type,
30 itab_bapi-io_txsht,
50 itab_bapi-io_txlng,
75 itab_bapi-io_datatype,
85 itab_bapi-io_length.
endloop.
SELECT THE LOCATION FOR TEXT FILE
AT SELECTION-SCREEN ON VALUE-REQUEST FOR sel_file.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_filename = ''
def_path = 'C:\'
mask = ',Documentos de texto (*.txt), *.txt.'
mode = ''
IMPORTING
filename = p_file
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
find '.txt' IN p_file.
if sy-subrc <> 0.
concatenate p_file '.txt' into sel_file.
else.
sel_file = p_file.
endif.
Change InfoObject Catalog through BAPI Function
*CALL FUNCTION 'bapi_iobc_change'
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(INFOOBJCAT) LIKE BAPI6113-INFOOBJCAT
*" VALUE(DETAILS) LIKE BAPI6113 STRUCTURE BAPI6113
*" TABLES
*" INFOOBJECTS STRUCTURE BAPI6113IO
*" RETURN STRUCTURE BAPIRET2 OPTIONAL
Create InfoObject through BAPI Function
CALL FUNCTION 'BAPI_IOBJ_CREATE'
IMPORTING
INFOOBJECT = itab_bapi-io_name
TYPE = itab_bapi-io_type
TEXTSHORT = itab_bapi-io_txsht
TEXTLONG = itab_bapi-io_txlng
DATATP = itab_bapi-io_datatype
INTLEN = itab_bapi-io_length.
*EXPORTING
INFOOBJECT = itab_bapi-io_name
RETURN = BAPIRET2.
TABLES
COMPOUNDS STRUCTURE BAPI6108CM OPTIONAL
ATTRIBUTES STRUCTURE BAPI6108AT OPTIONAL
NAVIGATIONATTRIBUTES STRUCTURE BAPI6108AN OPTIONAL
ATRNAVINFOPROVIDER STRUCTURE BAPI6108NP OPTIONAL
HIERARCHYCHARACTERISTICS STRUCTURE BAPI6108HC OPTIONAL
ELIMINATION STRUCTURE BAPI6108IE OPTIONAL
RETURNTABLE STRUCTURE BAPIRET2 OPTIONAL
Activate InfoObject through BAPI Function
*CALL FUNCTION 'BAPI_IOBJ_ACTIVATE_MULTIPLE'
*" TABLES
*" INFOOBJECTS STRUCTURE BAPI6108IO
*" RETURN STRUCTURE BAPIRET2 OPTIONAL
*" INFOOBJECTS_ERROR STRUCTURE BAPI6108IO OPTIONAL
If anyone knows any better idea creating IO dynamically, I can look at that too. Appreciate your help.
Regards,
Mau

what are your reference points
Is it always from current date then it that case your data will change daily.
Also is there a created date or something else associated with store id. how do you determine that

Similar Messages

  • Bulk infoobject creation

    Hello guru's,
    Is any program or FM is avilable in sap BI/BW for bulk creation of infoobjects(Char/KF) in one go?
    Thanks,
    Rishi Nigam

    Hi Rishi,
    we don't have such an utiltiy in SAP BI/BW to create mass infoobjects in one go, but if you want to create mass infoobjects (char/KF). you can write the the custom program to create multiple infoobjects in one go.
    by using the BAPI "'BAPI_IOBJ_CREATE'"and 'BAPI_IOBJ_ACTIVATE_MULTIPLE' you can create a utitity to bulk creation of infoobjects.
    1. define the all the fields
    2. use BAPI's to fetch the strucute of infoobjects
              BAPI6108IO
              BAPI6108
              BAPI6113
              BAPI6113IO
              BAPIRET2
    For Compounding:
              BAPI6108CM
    For Attribute use:
             BAPI6108AT
    For Navigational Attribute:
             BAPI6108AN
    3. Write a logic to fill this BAPI with the values of data file that has the infoobject details.
    keep the file with all details of infoobjects
    i.e.  INFOOBJECT, TYPE,TEXTSHORT,TEXTLONG, DATATP,INTLEN,COMPOUND,ATTRIBUTES,NAV ATTRS, KYFTP, FIXCUKY,
    , FIXUNIT, UNINM,  DECIMAL
    Take the help of ABAP person to build this logic.
    Thanks,
    Om Ambulker

  • COPA -Automatic infoobject creation in BI 7.0

    Hi Gurus
    We r implementing COPA in BI 7.0 version. I know that we can automatically get the infoobjects created in BI 3.5 version for the value fields and customer-defined characteristics if you assign the DataSource to an InfoSource via the source system view in the BW Administrator Workbench.
    In BI 7.0 is there such a facility? when i generate the COPA datasource in R/3 and replicate it to BI 7.0, the datsource gets generated as the Datasource in BI.7.0 version  and hence the option to assign the infosource to the datasource does not show up in BI.
    I wanted to know if there any other way that we can create these infoobjects for value fields and customer defined charasteritics automatically in BI.7 version
    Thanks for ur help

    Hi Voodi,
    I followed ur instructions and tried to create a transformation between 3.x infosource and 7.0 datasource. system prompted to create new infsource and copied all the infoobjects which were part of the 3.x standard infosource.
    But still system does not propose any infoobjects for the value fields starting with VV* . In BW3.5 for all VV* fields, system used to propose infoobjects strating with 0GV*.  Did u get system to propose these infoobjects?
    Thanks for ur help

  • Creation Dynamic session name using BDC session Method

    Hi All,
    I have one typical BDC problem. If the number of records in file are crossing 80,my bdc is giving problem .So I need to split total records into sets of 80 and submit them. So I need to create the session name dynamically, pass the data dynamically. IF you have example code  or know the procedure as how to proceed kindly inform me
    Regards
    Praveen

    Hi Rob,
    Please find my code below..
    Part of the variables are in Polish since the original developer is a polish guy..
    Praveen
    Code.
    *& Report  ZCO_I025_WSKAZNIKI_STAT_DEV                                 *
    *& Interfejs wczytywania wska&#378;ników statystycznych                     *
    REPORT  zco_i025_wskazniki_stat_dev                                 .
    TYPES:
      BEGIN OF l_tab_dane,
        indic LIKE rk23f-stagr,
        quant LIKE rk23f-mbgbtr,
        mpk LIKE rk23f-ekostl,
        order LIKE rk23f-eaufnr,
        text LIKE rk23f-sgtxt,
      END OF l_tab_dane.
    DATA:
      it_excel TYPE TABLE OF alsmex_tabline,
      wa_excel TYPE alsmex_tabline,
      it_data TYPE TABLE OF l_tab_dane,
      wa_data TYPE l_tab_dane,
      error  TYPE C,
      msg TYPE string.
    DATA:
      iv_pole TYPE string,
      ddatum(10),
      kdatum(10),
    *Inserted By satyam Developer
       filelist    TYPE filetable,
            rc          TYPE i.
    DATA: BEGIN OF bdctab OCCURS 5.
            INCLUDE STRUCTURE bdcdata.
    DATA: END OF bdctab.
    SELECTION-SCREEN BEGIN OF BLOCK p1 WITH FRAME TITLE text-001.
    PARAMETERS:
      p_zakla LIKE tka01-kokrs DEFAULT '1000',
      p_ddate LIKE sy-datum DEFAULT sy-datum,
      p_kdate LIKE sy-datum DEFAULT sy-datum.
    SELECTION-SCREEN ULINE.
    PARAMETERS:
      p_fname LIKE rlgrap-filename.  " DEFAULT 'd:dane.xls'.
    SELECTION-SCREEN END OF BLOCK p1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          file_filter       = cl_gui_frontend_services=>filetype_excel
         multiselection    = 'X'
        CHANGING
          file_table        = filelist
          rc                = rc.
      IF LINES( filelist ) IS INITIAL.
        EXIT.
      ENDIF.
      READ TABLE filelist INDEX 1 INTO p_fname.
    START-OF-SELECTION.
    AUTHORITY-CHECK OBJECT 'TKA01'
      ID 'KOKRS' FIELD p_zakla.
    CONCATENATE p_ddate6(2) '.' p_ddate4(2) '.' p_ddate(4) INTO ddatum.
    CONCATENATE p_kdate6(2) '.' p_kdate4(2) '.' p_kdate(4) INTO kdatum.
    error = '0'.
    PERFORM wczytaj_dane.
    IF error = '0'.
      PERFORM utworz_sesje.
      PERFORM wprowadz_dane.
       PERFORM zamknij_sesje.   "comment by prav
    ENDIF.
      PERFORM zamknij_sesje.        "add by prav
    IF error = '1'.
      WRITE: msg, /.
    ENDIF.
    WRITE: 'Wykonano', /.
    *&      Form  wczytaj_dane
          text
    FORM wczytaj_dane.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename                = p_fname
          i_begin_col             = 1
          i_begin_row             = 1
          i_end_col               = 8
          i_end_row               = 65000
        TABLES
          intern                  = it_excel
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
      IF sy-subrc <> 0.
        WRITE: / 'B&#322;ad importu pliku wejsciowego: ', p_fname, ' - ',
        sy-subrc.
      ELSE.
        SORT it_excel BY row col.
        LOOP AT it_excel INTO wa_excel.
          IF wa_excel-row = 1.
            CONTINUE.
          ENDIF.
          iv_pole = wa_excel-value.
          CASE wa_excel-col.
            WHEN 1. wa_data-indic = iv_pole.
            WHEN 2.
              REPLACE ',' WITH '.' INTO iv_pole.
              wa_data-quant = iv_pole.
            WHEN 3. wa_data-mpk = iv_pole.
            WHEN 4. wa_data-order = iv_pole.
            WHEN 5. wa_data-text = iv_pole.
          ENDCASE.
          AT END OF row.
            IF wa_data-mpk IS INITIAL AND wa_data-order IS INITIAL.
              error = '1'.
              WRITE:
    'Musi by&#263; podane Stanowisko kosztów lub Zlecenie wewn&#281;trzne. Rekord: ',
              wa_excel-row, /.
              EXIT.
            ENDIF.
            IF wa_data-mpk IS NOT INITIAL AND wa_data-order IS NOT INITIAL.
              error = '1'.
              WRITE:
    'Musi by&#263; podane Stanowisko kosztów lub Zlecenie wewn&#281;trzne. Rekord: ',
              wa_excel-row, /.
              EXIT.
            ENDIF.
            IF wa_data-indic IS INITIAL.
              error = '1'.
              WRITE: 'Brak identyfikatora wska&#378;nika. Rekord: ', wa_excel-row
              EXIT.
            ENDIF.
            IF wa_data-quant IS INITIAL.
              error = '1'.
              WRITE: 'Brak informacji o ilo&#347;ci. Rekord: ', wa_excel-row, /.
              EXIT.
            ENDIF.
            APPEND wa_data TO it_data.
            CLEAR wa_data.
          ENDAT.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    "wczytaj_dane
    *&      Form  wprowadz_dane
          text
    FORM wprowadz_dane.
      DATA:
        licznik TYPE i,
        l_txt TYPE string,
        pole(30) TYPE c,
        liczba(15) TYPE c.
      LOOP AT it_data into wa_data.
      PERFORM bdc_dynpro      USING 'SAPLSPO4' '0300'.
      PERFORM bdc_field       USING 'BDC_CURSOR' 'SVALD-VALUE(01)'.
      PERFORM bdc_field       USING 'BDC_OKCODE' '=FURT'.
      PERFORM bdc_field       USING 'SVALD-VALUE(01)' p_zakla.
      PERFORM bdc_dynpro      USING 'SAPLK23F1' '1200'.
      PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
      PERFORM bdc_field       USING 'COHEADER-SEND_REC_REL' '03SAP'.
      PERFORM bdc_field       USING 'RK23F-STATUS' 'L'.
      PERFORM bdc_field       USING 'COHEADER-BLDAT' ddatum.
      PERFORM bdc_field       USING 'COHEADER-BUDAT' kdatum.
      PERFORM bdc_field       USING 'BDC_CURSOR' 'EKOSTL(1)'.
      licznik = 0.
    LOOP AT it_data into wa_data.
        ADD 1 TO licznik.
        l_txt = licznik.
        CONCATENATE 'EL4(' l_txt ')' INTO pole.
        condense pole no-gaps.
        PERFORM bdc_field USING pole wa_data-indic.
        CONCATENATE 'ELR1(' l_txt ')' INTO pole.
           condense pole no-gaps.
          liczba = wa_data-quant.
          if liczba <  0.
              shift liczba circular  left up to '-'.
          endif.
            condense liczba no-gaps.
        PERFORM bdc_field USING pole liczba.
        IF NOT wa_data-mpk IS INITIAL.
          CONCATENATE 'EL2(' l_txt ')' INTO pole.
             condense pole no-gaps.
          PERFORM bdc_field USING pole wa_data-mpk.
        ENDIF.
        IF NOT wa_data-order IS INITIAL.
          CONCATENATE 'EL3(' l_txt ')' INTO pole.
             condense pole no-gaps.
          PERFORM bdc_field USING pole wa_data-order.
        ENDIF.
        CONCATENATE 'EL8(' l_txt ')' INTO pole.
           condense pole no-gaps.
        PERFORM bdc_field USING pole wa_data-text.
    call transaction 'KB31N' using bdctab mode 'A'.
    refresh:bdctab.
    clear bdctab.
      ENDLOOP.
    CALL FUNCTION 'BDC_INSERT'
       EXPORTING
         tcode            = 'KB31N'
       TABLES
         dynprotab        = bdctab
       EXCEPTIONS
         internal_error   = 1
         not_open         = 2
         queue_error      = 3
         tcode_invalid    = 4
         printing_invalid = 5
         posting_invalid  = 6
         OTHERS           = 7.
    IF sy-subrc <> 0.
       WRITE: / text-010 .
    ENDIF.
    call transaction 'KB31N' using bdctab mode 'A'.
    REFRESH bdctab.
    clear:bdctab.        "by praveen
    ENDFORM.                    "wprowadz_dane
    *&      Form  bdc_dynpro
          text
         -->PROGRAM    text
         -->DYNPRO     text
    FORM bdc_dynpro USING program dynpro.
      CLEAR bdctab.
      MOVE:
        program   TO bdctab-program,
        dynpro    TO bdctab-dynpro,
        'X'       TO bdctab-dynbegin.
      APPEND bdctab.
    ENDFORM.                    "bdc_dynpro
    *&      Form  bdc_field
          text
         -->POLE       text
         -->WARTOSC    text
    FORM bdc_field USING pole wartosc.
      CLEAR bdctab.
      MOVE:
        pole     TO bdctab-fnam,
        wartosc  TO bdctab-fval.
      APPEND bdctab.
    ENDFORM.                    "bdc_field
    *&      Form  utworz_sesje
          text
    FORM utworz_sesje.
      CALL FUNCTION 'BDC_OPEN_GROUP'
        EXPORTING
          client = sy-mandt
          group  = 'WSKASTAT'
          user   = sy-uname
          keep   = 'X'.
    **begin  of praveen
    *if sy-subrc ne 0.
    write 'hai'.
    endif.
    **end of praveen
    ENDFORM.                    "utworz_sesje
    *&      Form  zamknij_sesje
          text
    FORM zamknij_sesje.
      CALL FUNCTION 'BDC_CLOSE_GROUP'.
      IF sy-subrc NE 0.
        WRITE: /, 'B&#322;ad podczas zamykania sesji'.
        EXIT.
      ENDIF.
    ENDFORM.                    "zamknij_sesje

  • How can I have any new pernr creation dynamically trigger custom code

    I would like to develop a custom process that is triggered whenever a new pernr is created. So basically when pa40 is used to hire an employee, is there a way for this new hire event to trigger my custom code. I would like to grab the new pernr, look up the CP object just created, and save this CP data in a custom infotype. I looked into the possibility of using dynamic actions, and the user exit zxpadu02 option. The options I mentioned may work, but I was hoping to find a more solid solution where the moment a pernr and its CP are created, my custom code can execute.

    The major issue with the user-exit approach is the fact that screen navigation varies during the pa40 process depending on action and country grouping. When the user-exit executes during infotype 0000 processing, the new pernr and CP object have not yet been created. If we use a different infotype (IT0002 for example) to trigger our custom code in the bapi, we may get unexpected results due to user unpredictability. If they decide to exit the hiring screens early for some reason.

  • Item Creation Dynamically

    Hi All,
    I have a master table which contains the information of all the items in my form For Eg : Take all the fields of emp table.
    My table format will be as below,
    ColumnName CheckField
    EMPNO----------> N
    EMPNAME--------> Y
    EMPDESIG--------> Y
    Am maintaining a form for this master data maintenance in Admin module. So based upon the requirement, admin will set the CheckField value for the items related to that table. But in my application for the end users am having a form based upon the table(for eg: emp) there apart from the database column items, i need to generate a dynamic check box for the items with the CheckField flag value 'Y' in the above table in that particular time.
    Am using Application Express 3.2.1.00.12
    Please help me out in achieving this.
    Thanks in advance.
    Regards,
    Sakthi.
    Edited by: Sakthi on Sep 27, 2011 5:20 AM
    Edited by: Sakthi on Sep 27, 2011 5:22 AM

    Hi,
    you can visit the following links. It will helps you to create a LOV using Form Personalization.
    http://apps2fusion.com/apps-training/147-forms-personalizations
    http://blog.optiosys.com/?p=202
    http://erpschools.com/articles/change-displayed-data-in-lov-using-forms-personalization#13486622087461&59812::resize_frame
    HTH
    Sanjay

  • InfoObject Creation Date

    Hi All,
    I want to collect the infoObjects for a transport but i am afraid i might missed out or accidentally collect more then it suppose to.
    Is it possible to trace down all the infoObjects created e.g from 01.05.2010 , by date?
    Thank you.
    Regards,
    Maili

    RSA1 -> select ENVIRONMENT menu METADATE SEACH -> select INFO OBJECT in SEARCH IN -> ADVANCE SEARCH -> and u mention the criteria and click on SEARCH.
    Edited by: NVDVPRASAD on Oct 1, 2010 6:41 AM

  • InfoObject Creation through Code

    Hi,
    Is there a way to create infoobjects through a code??
    Can an ABAP code be written to create Infoobjects and other objects in BW?
    If so, pls. give me details...
    Thanks

    Hi vaishali,
    Why do u want to create IO thru ABAP code. SAP makes our development simple by the presentation screens, so just do like this.
    Think of craeting different tables which are created while generating IO. all the table u have to create and no whare u can link SID table with P table.
    Narendra Reddy

  • Infoobject creation

    Hi all
    I have a flat file with the contents as below
    cid            pid            amt          price    qty   currency    unit
    c100        p100           100        50        2         INR            EA
    C200        P200           200    100           2          INR          EA
    C300        P300           300      100          3            USD      EA
    now how many infoobject i have to create ? according to my knowledge 7 infoobject i have to create is it correct plz correct me if i were wrong

    Hi garima
    thanx for ur reply
    where do i find the fixed currency tab in the infoobject .
    Suppose i kept the fixed currency tab as blank  and choose the currency as 0currency , so here on what basis the currency will be made . i mean 100 INR OR USD  on what basis the currency will be made , should we give any field as reference field so that the field currency will be reflected
    Thanx and regards
    RaviChandra
    Edited by: Ravichandra.bi on Apr 25, 2011 3:45 PM

  • ALV creation Dynamic

    Sir
    Based on Material Group , i want to create field for Material Number dynamic .
    Ex. Material Group 106 have 3 Material number , i want to create ALV field Dynamic for material number .
    How to Create it.
    Plz provide me solution.
    sanjeev verma

    Hi Sanjeev,
    Look below code. Change it according to ur requiremnet.
    REPORT ztest.
    DATA: fcat_itab TYPE lvc_t_fcat,
                fcat_wa TYPE lvc_s_fcat,
                poi_itab TYPE REF TO data.
    FIELD-SYMBOLS: <itab> TYPE STANDARD TABLE.
    DATA: BEGIN OF mat_group OCCURS 0,
                matkl TYPE matkl,
                matnr TYPE matnr,
               END OF mat_group,
               wa LIKE mat_group,
                lin TYPE i.
    DATA: str TYPE string,
                i TYPE i VALUE 1,
               ch(5) TYPE c.
    PARAMETERS: p_matkl TYPE matkl.  " Enter material group
    START-OF-SELECTION.
    SELECT matkl matnr FROM mara INTO TABLE mat_group WHERE matkl = p_matkl.
    DESCRIBE TABLE mat_group LINES lin.
    DO lin TIMES.
      ch = i.
      CONCATENATE 'MATNR' ch INTO str.
      CONDENSE str NO-GAPS.
      fcat_wa-fieldname = str.
      fcat_wa-ref_field = 'MATNR'.
      fcat_wa-ref_table = 'MARA'.
      APPEND fcat_wa TO fcat_itab.
      i = i + 1.
    ENDDO.
    *Create dynamic internal table
    CALL METHOD cl_alv_table_create=>create_dynamic_table
      EXPORTING
        it_fieldcatalog           = fcat_itab
      IMPORTING
        ep_table                  = poi_itab
      EXCEPTIONS
        generate_subpool_dir_full = 1
        OTHERS                    = 2.
    ASSIGN poi_itab->* TO <itab>.    "   <itab>  contains material number as fields
    Thanks,

  • Dynamic file upload ui element

    Hi
    Can any ne tell me how to create file upload dynamically..i can able to create ui elemetn using the class cl_Wd_file_upload
    but for binding i hav to create context node dynamically  with the structute filename filecontent file size..

    Hi,
    Check this wiki : [Dynamic Context Creation, Dynamic Mapping|http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/201ddd3b-b4ce-2b10-8883-880ae8147f89] by Thomas sir.,
    hope this helps u.,
    Thanks & Regards,
    Kiran

  • Why After Vo Creation dynamicall i got the this error ?

    Hi Gurus,
    After VO Creation dynamically i got this error pl z help us.
    **Message not found. Application: FND, Message Name: FND_VIEWOBJECT_NOT_FOUND. Tokens: VONAME = BehCompetenceElementsVoEx; APPLICATION_MODULE = xxhr.oracle.apps.per.selfservice.appraisals.server.BEHVAssessmentsAMEx;**
    i am trying create the new VO dynamically .
    i am using this code plz help us.
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject ratingvo = (OAViewObject)am.findViewObject("BehCompetenceElementsVoEx");
    if ( ratingvo != null ) {
    System.out.println("Vo Found VO BehCompetenceElementsVoEx for AM. This means we have re-entered the page" );
    else
    System.out.println("CAN NOT FIND VO for AM" );
    ratingvo = (OAViewObject)am.createViewObject("BehCompetenceElementsVoEx", "xxhr.oracle.apps.per.selfservice.appraisals.server.BehCompetenceElementsVoEx") ;
    Regards,
    Srini

    Hi Ali,
    Plz help i am new in these things this is my VO Query ,plz help me how to write the programmatic ........i am trying but unable to retrieve the data plz give me any reference controller.
    SELECT pce.competence_element_id, pce.business_group_id, pce.competence_id,
    pce.proficiency_level_id, pce.high_proficiency_level_id,
    pce.weighting_level_id, pce.rating_level_id, pce.person_id,
    pce.enterprise_id, pce.job_id, pce.valid_grade_id, pce.position_id,
    pce.organization_id, pce.assessment_id, pce.assessment_type_id,
    pce.comments, pce.effective_date_from, pce.effective_date_to,
    pce.line_score, pce.attribute_category, pce.attribute1,
    pce.attribute2, pce.attribute3, pce.attribute4, pce.attribute5,
    pce.attribute6, pce.attribute7, pce.attribute8, pce.attribute9,
    pce.attribute10, pce.attribute11, pce.attribute12, pce.attribute13,
    pce.attribute14, pce.attribute15, pce.attribute16, pce.attribute17,
    pce.attribute18, pce.attribute19, pce.attribute20, pc.NAME,
    pc.competence_id AS competence_id1, pc.rating_scale_id,
    pc.competence_alias,
    DECODE (pce3.TYPE,
    'ASSESSMENT', 'DisableCompDelete',
    'ASSESSMENT_COMPETENCE', 'DisableCompDelete',
    NVL ((SELECT DISTINCT 'DisableCompDelete'
    FROM per_competence_elements
    WHERE parent_competence_element_id =
    pce.competence_element_id),
    'EnableCompDelete'
    ) AS delete_comp,
    pce.parent_competence_element_id, prl1.NAME AS prof_level,
    prl1.rating_level_id AS rating_level_id1, prl2.NAME AS perf_level,
    prl2.rating_level_id AS rating_level_id2, prl3.NAME AS weigh_level,
    prl3.rating_level_id AS rating_level_id3, pce.object_id,
    pce.object_name, pce1.competence_element_id AS ref1_comp_element_id,
    pce1.proficiency_level_id AS ref1_prof_level_id,
    pce1.weighting_level_id AS ref1_weigh_level_id,
    pce1.rating_level_id AS ref1_perf_level_id,
    pce1.comments AS ref1_comments,
    pce1.attribute_category AS ref1_attribute_category,
    pce1.attribute1 AS ref1_attribute1,
    pce1.attribute2 AS ref1_attribute2,
    pce1.attribute3 AS ref1_attribute3,
    pce1.attribute4 AS ref1_attribute4,
    pce1.attribute5 AS ref1_attribute5,
    pce1.attribute6 AS ref1_attribute6,
    pce1.attribute7 AS ref1_attribute7,
    pce1.attribute8 AS ref1_attribute8,
    pce1.attribute9 AS ref1_attribute9,
    pce1.attribute10 AS ref1_attribute10,
    pce1.attribute11 AS ref1_attribute11,
    pce1.attribute12 AS ref1_attribute12,
    pce1.attribute13 AS ref1_attribute13,
    pce1.attribute14 AS ref1_attribute14,
    pce1.attribute15 AS ref1_attribute15,
    pce1.attribute16 AS ref1_attribute16,
    pce1.attribute17 AS ref1_attribute17,
    pce1.attribute18 AS ref1_attribute18,
    pce1.attribute19 AS ref1_attribute19,
    pce1.attribute20 AS ref1_attribute20,
    pce2.competence_element_id AS ref2_comp_element_id,
    pce2.proficiency_level_id AS ref2_prof_level_id,
    pce2.weighting_level_id AS ref2_weigh_level_id,
    pce2.rating_level_id AS ref2_perf_level_id,
    pce2.comments AS ref2_comments,
    pce2.attribute_category AS ref2_attribute_category,
    pce2.attribute1 AS ref2_attribute1,
    pce2.attribute2 AS ref2_attribute2,
    pce2.attribute3 AS ref2_attribute3,
    pce2.attribute4 AS ref2_attribute4,
    pce2.attribute5 AS ref2_attribute5,
    pce2.attribute6 AS ref2_attribute6,
    pce2.attribute7 AS ref2_attribute7,
    pce2.attribute8 AS ref2_attribute8,
    pce2.attribute9 AS ref2_attribute9,
    pce2.attribute10 AS ref2_attribute10,
    pce2.attribute11 AS ref2_attribute11,
    pce2.attribute12 AS ref2_attribute12,
    pce2.attribute13 AS ref2_attribute13,
    pce2.attribute14 AS ref2_attribute14,
    pce2.attribute15 AS ref2_attribute15,
    pce2.attribute16 AS ref2_attribute16,
    pce2.attribute17 AS ref2_attribute17,
    pce2.attribute18 AS ref2_attribute18,
    pce2.attribute19 AS ref2_attribute19,
    pce2.attribute20 AS ref2_attribute20,
    pce3.competence_element_id AS par_comp_element_id,
    pce1.TYPE AS type1, pce2.TYPE AS type2, pce3.TYPE AS type3, pce.TYPE
    FROM per_competence_elements pce,
    per_competences_vl pc,
    per_rating_levels_vl prl1,
    per_rating_levels_vl prl2,
    per_rating_levels_vl prl3,
    per_competence_elements pce1,
    per_competence_elements pce2,
    per_competence_elements pce3
    WHERE pce.competence_id = pc.competence_id
    AND pce.proficiency_level_id = prl1.rating_level_id(+)
    AND pce.rating_level_id = prl2.rating_level_id(+)
    AND pce.weighting_level_id = prl3.rating_level_id(+)
    AND pc.NAME LIKE 'BEHV%'
    --AND pc.NAME is         Not Null
    AND pce.competence_id = pce1.competence_id(+)
    AND pce1.object_id(+) = :1
    AND pce.assessment_id = pce1.assessment_id(+)
    AND pce1.object_name(+) = :2
    AND pce.competence_id = pce2.competence_id(+)
    AND pce2.object_id(+) = :3
    AND pce.assessment_id = pce2.assessment_id(+)
    AND pce2.object_name(+) = :4
    AND pce.parent_competence_element_id = pce3.competence_element_id(+)
    AND (pce.assessment_id = :5 AND pce.object_id = :6
    AND pce.object_name = :7
    ORDER BY pc.NAME
    Regards,
    Srini

  • Authorization in Infoobjects

    Hi
    I have a query regarding the Authorization setting provided in the Infoobject creation. There is an option called Authorization relevant in the business explorer tab. The explanation that is mentioned here is, If this indicator is set, authorization objects for Reporting can be generated with this characteristic.
      There is also an option Maintenance of master data is relevant for authorization in the Master data tab.  The explanation that is mentioned here is,  If this indicator is set, maintenance of the master data / texts for this characteristic can be protected for the single records by means of authorizations.
         I am not able to make out the difference between the two options. The first one refers to the case where authorization setting corresponds to values display in the report. The second option relates with the master data entries for a info object.
    Are both related to restricting the values of the characteritsic/ infoobject then? What is the difference between the two settings?
    Thanks!

    Authorization Relevant in Business Explorer Tabl - With this setting, this info object can be made authorization relevant for reporting. For Example, let us take Region as an info object. If this is made authorization relevant in business explorer tab, in reporting you can give access to user for its values.
    If it has values like APAC, EAME, NAFTA and LATAM - you can create roles which will assigned to user so that a Europe use will be able to see data only for EAME in the report, similarly a US user will be able to see data only for NAFTA region.
    Thus data access in the reporing can be controlled using this setting.
    Maintenance of master data authorization relevant - This setting is related only for master data maintenace. Let us there is an info object Country and it has an attribute Region. Now Country has values like Jermany, France, US, Canada, India, Brajil etc.
    Master data attribute - Region can be maintained manually in the system. Using this setting in master data tab you can restrict a particular user to maintain Region values for particular countries.
    you can restrict User1 to maintain region only for Jermany and France.
    User2 to maintain Region only for US, Canada and so on.
    This first setting is for data access to be given for reporting purpose.
    Second setting is only for  maintaing the attribute values for characteristic.
    I hope it helps.
    Regards,
    Gaurav

  • How to populate internal table field with text data?

    Hello Experts,
    I was able to load text file to a internal table but data is not populating each field. Can someone help me how to populate each field of internal table from text file?
    Here is the text file:
    io_name, io_type, io_txsht, io_txlng, io_datatype, io_length
    ZEA_IO1, CHA, IO Test,     IO Test 1, CHAR,       20
    ZEA_IO2, CHA, IO Test,     IO Test 2, CHAR,       20
    Here is the Code:
    *& Report  ZAS_BAPI_TEST                                               *
    *& InfoObject Creation through BAPI.
    *& Read the Text file, call a BAPI to create InfoObjects.              *
    *& Text file will hold the Info Object Structure. Text file will be    *
    *& located either work station or local PC.
    *& Step 1. Create internal table to hold InfoObject structure          *
    *& Step 2. Retrieve/Load text file into Internal Table structure       *
    *& Step 3. Call BAPI Function to Create IO                             *
    *& Step 4. Call BAPI Function to Activate IO                           *
    REPORT  ZAS_BAPI_TEST                           .
    Make data separator a comma
    CONSTANTS: gc_tab TYPE c VALUE ','.
          Declaring Internal table for creating InfoObject
    DATA: p_file TYPE string.
    DATA: BEGIN OF itab-bapi OCCURS 0,
            io_name like BAPI6108-infoobject,
            io_type like BAPI6108-type,
            io_txsht like BAPI6108-textshort,
            io_txlng like BAPI6108-textlong,
            io_datatype like BAPI6108-datatp,
            io_length like BAPI6108-intlen,
          END OF itab-bapi.
    DATA ibapi LIKE STANDARD TABLE OF itab-bapi.
    PARAMETERS: sel_file(1500) TYPE c default ' ' OBLIGATORY LOWER CASE.
          PUT THE TEXT FILE PATH TO P_FILE
    p_file = sel_file.
         Copy the file from the workstation to the server        ****
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                = p_file
                   FILETYPE                = 'ASC'
                   HAS_FIELD_SEPARATOR     = SPACE
                   HEADER_LENGTH           = 0
                   DAT_MODE                = SPACE
                   CODEPAGE                = SPACE
                   IGNORE_CERR             = ABAP_TRUE
                   REPLACEMENT             = '#'
                   READ_BY_LINE            = 'X'
                 IMPORTING
                   FILELENGTH              =
                   HEADER                  =
      TABLES
        data_tab                = itab-bapi[]
      EXCEPTIONS
        file_open_error         = 1
        file_read_error         = 2
        no_batch                = 3
        gui_refuse_filetransfer = 4
        invalid_type            = 5
        no_authority            = 6
        unknown_error           = 7
        bad_data_format         = 8
        header_not_allowed      = 9
        separator_not_allowed   = 10
        header_too_long         = 11
        unknown_dp_error        = 12
        access_denied           = 13
        dp_out_of_memory        = 14
        disk_full               = 15
        dp_timeout              = 16
        not_supported_by_gui    = 17
        error_no_gui            = 18
        OTHERS                  = 19.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      MESSAGE e012(zea_spms) WITH 'Method' 'GUI_UPLOAD' sy-subrc.
      &1 &2 issued return code &3
       ELSE.
         pit_data[] = lit_data[].
       ENDIF.
    ENDIF.
    loop at itab-bapi.
      write: /5 itab-bapi-io_name,
               20 itab-bapi-io_type,
               30 itab-bapi-io_txsht,
               50 itab-bapi-io_txlng,
               75 itab-bapi-io_datatype,
               85 itab-bapi-io_length.
    endloop.
          SELECT THE LOCATION FOR TEXT FILE
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR sel_file.
      CALL FUNCTION 'WS_FILENAME_GET'
        EXPORTING
          def_filename     = ''
          def_path         = 'C:\'
          mask             = ',Documentos de texto (*.txt), *.txt.'
          mode             = ''
        IMPORTING
          filename         = p_file
        EXCEPTIONS
          inv_winsys       = 1
          no_batch         = 2
          selection_cancel = 3
          selection_error  = 4
          OTHERS           = 5.
      find '.txt' IN p_file.
      if sy-subrc <> 0.
        concatenate p_file '.txt' into sel_file.
      else.
        sel_file = p_file.
      endif.
          Create InfoObject through BAPI Function
    *CALL FUNCTION 'BAPI_IOBJ_CREATE'.
    *IMPORTING
        VALUE(DETAILS) LIKE  BAPI6108 STRUCTURE  BAPI6108
    *EXPORTING
        VALUE(INFOOBJECT) LIKE  BAPI6108-INFOOBJECT
        VALUE(RETURN) LIKE  BAPIRET2 STRUCTURE  BAPIRET2
    TABLES
         COMPOUNDS STRUCTURE  BAPI6108CM OPTIONAL
         ATTRIBUTES STRUCTURE  BAPI6108AT OPTIONAL
         NAVIGATIONATTRIBUTES STRUCTURE  BAPI6108AN OPTIONAL
         ATRNAVINFOPROVIDER STRUCTURE  BAPI6108NP OPTIONAL
         HIERARCHYCHARACTERISTICS STRUCTURE  BAPI6108HC OPTIONAL
         ELIMINATION STRUCTURE  BAPI6108IE OPTIONAL
         RETURNTABLE STRUCTURE  BAPIRET2 OPTIONAL
          Activate InfoObject through BAPI Function
    CALL FUNCTION 'BAPI_IOBJ_ACTIVATE_MULTIPLE'
    *ENDFORM.                    " RETRIEVE_DATASET
    I appreciate your help.
    Regards,
    Mau

    I have used tab delimited file.
    Here are file contents
    io_name     io_type     io_txsht     io_txlng     io_datatype     io_length
    ZEA_IO1     CHA     IO Test     IO Test 1     CHAR     20
    ZEA_IO2     CHA     IO Test     IO Test 2     CHAR     20
    And here is program used
    *& Report ZAS_BAPI_TEST *
    *& InfoObject Creation through BAPI.
    *& Read the Text file, call a BAPI to create InfoObjects. *
    *& Text file will hold the Info Object Structure. Text file will be *
    *& located either work station or local PC.
    *& Step 1. Create internal table to hold InfoObject structure *
    *& Step 2. Retrieve/Load text file into Internal Table structure *
    *& Step 3. Call BAPI Function to Create IO *
    *& Step 4. Call BAPI Function to Activate IO *
    REPORT ZAS_BAPI_TEST .
    Make data separator a comma
    CONSTANTS: gc_tab TYPE c VALUE ','.
    Declaring Internal table for creating InfoObject
    DATA: p_file TYPE string.
    DATA: BEGIN OF itab-bapi OCCURS 0,
    io_name like BAPI6108-infoobject,
    io_type like BAPI6108-type,
    io_txsht like BAPI6108-textshort,
    io_txlng like BAPI6108-textlong,
    io_datatype like BAPI6108-datatp,
    io_length like BAPI6108-intlen,
    END OF itab-bapi.
    DATA ibapi LIKE STANDARD TABLE OF itab-bapi.
    PARAMETERS: sel_file(1500) TYPE c default ' ' OBLIGATORY LOWER CASE.
    PUT THE TEXT FILE PATH TO P_FILE
    p_file = sel_file.
    Copy the file from the workstation to the server ****
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = p_file
    <b>FILETYPE = 'ASC'
    HAS_FIELD_SEPARATOR = 'X'</b>
    TABLES
    data_tab = itab-bapi[]
    EXCEPTIONS
    file_open_error = 1
    file_read_error = 2
    no_batch = 3
    gui_refuse_filetransfer = 4
    invalid_type = 5
    no_authority = 6
    unknown_error = 7
    bad_data_format = 8
    header_not_allowed = 9
    separator_not_allowed = 10
    header_too_long = 11
    unknown_dp_error = 12
    access_denied = 13
    dp_out_of_memory = 14
    disk_full = 15
    dp_timeout = 16
    not_supported_by_gui = 17
    error_no_gui = 18
    OTHERS = 19.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    MESSAGE e012(zea_spms) WITH 'Method' 'GUI_UPLOAD' sy-subrc.
    &1 &2 issued return code &3
    ELSE.
    pit_data[] = lit_data[].
    ENDIF.
    ENDIF.
    loop at itab-bapi.
    write: /5 itab-bapi-io_name,
    20 itab-bapi-io_type,
    30 itab-bapi-io_txsht,
    50 itab-bapi-io_txlng,
    75 itab-bapi-io_datatype,
    85 itab-bapi-io_length.
    endloop.
    SELECT THE LOCATION FOR TEXT FILE
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR sel_file.
    CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
    def_filename = ''
    def_path = 'C:\'
    mask = ',Documentos de texto (*.txt), *.txt.'
    mode = ''
    IMPORTING
    filename = p_file
    EXCEPTIONS
    inv_winsys = 1
    no_batch = 2
    selection_cancel = 3
    selection_error = 4
    OTHERS = 5.
    find '.txt' IN p_file.
    if sy-subrc <> 0.
    concatenate p_file '.txt' into sel_file.
    else.
    sel_file = p_file.
    endif.
    Create InfoObject through BAPI Function
    *CALL FUNCTION 'BAPI_IOBJ_CREATE'.
    *IMPORTING
    VALUE(DETAILS) LIKE BAPI6108 STRUCTURE BAPI6108
    *EXPORTING
    VALUE(INFOOBJECT) LIKE BAPI6108-INFOOBJECT
    VALUE(RETURN) LIKE BAPIRET2 STRUCTURE BAPIRET2
    TABLES
    COMPOUNDS STRUCTURE BAPI6108CM OPTIONAL
    ATTRIBUTES STRUCTURE BAPI6108AT OPTIONAL
    NAVIGATIONATTRIBUTES STRUCTURE BAPI6108AN OPTIONAL
    ATRNAVINFOPROVIDER STRUCTURE BAPI6108NP OPTIONAL
    HIERARCHYCHARACTERISTICS STRUCTURE BAPI6108HC OPTIONAL
    ELIMINATION STRUCTURE BAPI6108IE OPTIONAL
    RETURNTABLE STRUCTURE BAPIRET2 OPTIONAL
    Activate InfoObject through BAPI Function
    CALL FUNCTION 'BAPI_IOBJ_ACTIVATE_MULTIPLE'
    *ENDFORM. " RETRIEVE_DATASET
    This program is working fine. You can test it.
    Only problem is as the column headings are big for some columns, they are getting truncated which you can always change by changing the column width in declaration
    Please let me know if this helps.
    ashish

  • Thru code how to create a context node n context attribute for a table

    Hi Friends....i need some clarification...according to my requirement i need 2 create contx node n ctx attribute for a table..i.e through the code(implemention NWDS) means this has 2 b done in dynamically...
          More clearly according to the structure of a table in MySql DB the same table structure  has 2 b designe in my view ..suppose my table(MySql) have 20 col's(name,dept,desig..) n 300 recoreds ..i hav to show that structure in view.
    waiting for reply..frndzzzzzzzz

    Hi Rajeshkelam,
    Take a Value Node say "Employee".
    Create 20 Value attributes (name, dept, desig..) under the Value Node(Employee).
    Then Create a Dynamic Table using the "Employee" Value Node.
    check this threads.
    Dynamic table creation
    Dynamic Table
    Regards,
    Mithu

Maybe you are looking for

  • I pay but I can't convert my file

    I pay but it keep to ask to pay. best regards

  • Where can I buy a used apple laptop

    Hello! My 12 year old son is saving up to purchase an apple laptop / MacBook. But making money at his age isn't that easy. So I suggested maybe looking into a used / refurbished MacBook. Does anyone know if this is something that can be purchased thr

  • Can a *REC be too long?

    Hi, I am working in a YTD model where I have two accounts. On account 1 the users enter data, for some categories month by month for others all 12 months of a year at once. The requirement is to calculate the cumulative of the YTD values divided by t

  • QM-IDI INTERFACE

    Hi all, while going through QM IDI Documentation, I came across QM Subsystem & External systems. what is the difference between external system and QM subsystem ? Also what is the purpose of QM SUBSYSTEM ? I have already gone through QM IDI Documenta

  • Questions that probably require an updated os...

    am loving my ipod touch, replaces my now-unmissed palm tx. meanwhile, driving me crazy: can i turn off spell check? delete mail (instead of sending to trash, then going there and deleting? global delete? (i already know the answer is 'not yet'). cut