TYPE OF STRUCTURE TO BE GIVEN

CASE f_selfield-fieldname.
    WHEN lc_VBELN.
            IF f_selfield-value IS NOT INITIAL.
        PERFORM display_salesdoc USING f_selfield-value.
      ENDIF.
ENDCASE.
WHAT IS THE TYPE FOR F_SELFIELD SHOULD I GIVE.
I DECLARED
DATA:F_SELFIELD TYPE SLIS_FIELDCAT_ALV.
IT IS giVING ME AN ERROR SAYING THAT---->
The data object "F_SELFIELD" does not have a  component called value.
points will b rewarded...
thanks.....

the field  selfield is passed to the USER_COMMAND form and should be part of your USING list.
FORM user_command
        USING p_ucomm LIKE sy-ucomm
              p_selfield TYPE slis_selfield.     "<== Here
  IF p_selfield-value NE space.
    CASE p_selfield-tabname.
      WHEN 'IT_OUT'.
        READ TABLE it_out INDEX p_selfield-tabindex
                  INTO out_rec.
      WHEN OTHERS.
        EXIT.
    ENDCASE.
  ELSE.
    EXIT.
  ENDIF.
  CHECK sy-subrc = 0.
  CASE p_selfield-fieldname.
*    WHEN 'QUOTE'
*      OR 'SALESORD'.
*      SET PARAMETER ID 'AUN' FIELD p_selfield-value.
*      CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
*    WHEN 'NAME1'.
*      SET PARAMETER ID 'KUN' FIELD OUT_REC-kunnr.
*      CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
*    WHEN 'LOTEVAL'.
*      SET PARAMETER ID 'ZLOTNUM' FIELD p_selfield-value.
*      SET PARAMETER ID 'KUN' FIELD OUT_REC-kunnr.
*      CALL TRANSACTION 'ZLOT' AND SKIP FIRST SCREEN.
*    WHEN 'CREDITAPP'.
*      SET PARAMETER ID 'ZCRDNUM' FIELD p_selfield-value.
*      SET PARAMETER ID 'KUN' FIELD OUT_REC-kunnr.
*      CALL TRANSACTION 'ZCRD' AND SKIP FIRST SCREEN.
*    WHEN 'PROJECT'.
*      SET PARAMETER ID 'PSP' FIELD OUT_REC-project.
*      CALL TRANSACTION 'CJ20N' AND SKIP FIRST SCREEN.
*    WHEN 'ACCNO'.
*      SET PARAMETER ID 'ZREO' FIELD p_selfield-value.
*      CALL TRANSACTION 'ZREO' AND SKIP FIRST SCREEN.
    WHEN OTHERS.
      EXIT.
  ENDCASE.
ENDFORM.                    "user_command

Similar Messages

  • Dynamic typeing of a type any structure at runtime.

    Hello Gurus,
    i have in my Method a TYPE ANY structure as import parameter declared, the structure has in the calling program a dictionary structure type.
    Can i change (or assign) the new dictionary structure TYPE to the import parameter like for example as below in the third line ??
      l_rcl_struc ?= cl_abap_typedescr=>describe_by_data( i_str_applparam ).
      l_var_ddic_header = l_rcl_struc->get_ddic_header( ).
    ?? data: i_str_applparam type (l_var_ddic_header-tabname). ??
    Greetings,
    Ioan Constantin.

    Hello,
    the structure has in the calling program a dictionary structure type.
    This is pretty basic then
    DATA: DREF TYPE REF TO DATA.
    FIELD-SYMBOL: <STRUC> TYPE ANY.
    CREATE DATA DREF TYPE (l_var_ddic_header-tabname).
    ASSIGN DREF->* TO <STRUC>.
    BR,
    Suhas

  • Create dynamic data type in structure

    Hi Experts,
    I am new to ABAP.
    In my scenario data type is varying for the field. for that I need to create dynamic data type in structure, this structure I am using for  internal table for OVS search input.
    Please suggest the solution for this.
    Advance thanks,
    Regards,
    BBC

    Thanks for your quick reply,
    I used your logic like this.
    data:
    ls_component type abap_componentdescr,
    lt_component type abap_component_tab.
    *... (1) define structure components :
    clear ls_component.
    ls_component-name = 'NVALUE'.
    ls_component-type ?= cl_abap_typedescr=>describe_by_name( <fs_seg_v>-fieldname ).
    insert ls_component into table lt_component.
    *... (2) create structure
    data lr_strucdescr type ref to cl_abap_structdescr.
    data lr_data_struc type ref to data.
    lr_strucdescr = cl_abap_structdescr=>create( lt_component ).
    create data lr_data_struc type handle lr_strucdescr.
    field-symbols <fs> TYPE any.
    assign lr_data_struc->* to <fs>.
    your logic is working fine.
    here I am getting feild name (<fs_seg_v>-fieldname) from internal table.
    But I need to assign same field name structure to query parameter.
    FIELD-SYMBOLS: <ls_query_params> TYPE lty_stru_input.
    Please can you suggest how I can refer the field name structure?
    Regards,
    BBC

  • Wht r types of structures in ABAP

    Hi,
         Wht r types of structures in ABAP. Answer rewarded.
    Regds.
    Balakri...

    Hi baddala,
    Structures which either directly or in substructures contain only fields of types C, N, D or T.
    The main characteristics of the different kinds of structures are:
    Flat structures contain only fields of the elementary types C, N, D, T, F, I, P, and X, or structures containing these types.
    Deep structures contain strings, internal tables and field or object references in addition to the elementary types.
    Nested structures are structures that contain substructures as components.
    Non-nested structures are structures that do not contain any substructures.
    \[removed by moderator\]
    Edited by: Jan Stallkamp on Jun 10, 2008 2:24 PM

  • Nested Abap Type 1 structure

    Could anybody provide an example of existing nested Abap Type 1 structure?
    Update: The structure should already exists and used as a parameter type for the remotely enabled function module. I could only access the function, not to write abap code.

    Sam,
    I am not sure of what TYPE 1 is, but here is a example of nested structures.
    Begin of itab1 occurs 0,
    field1 type c
    field2 type c
    end of itab1.
    Begine of itab2 occurs 0
    field3 type c
    table1 type itab1.
    end of itab2.
    ITAB2 is a nested internal table structure.
    Regards,
    Ravi
    Note : Please mark the helpful answers.

  • Different types of structures

    Hi all,
    there are 2 types of structures
       1. global ( at infocube level)
       2. local (query designer )
    how to create a global structure at the infocube level. Can any one let me know the procedure to create a global structure in bw.
    thanxs in advance
    hari

    Hi Hari,
    Global(Reusable) and Local Structures:
    Structures are combinations of characteristics and key figures (of basic key figures,calculated key figures, or restricted key figures) of the InfoProvider. A structure can be used in a planned/actual comparison or in a contribution margin scheme.
    Structures can also be used in several queries for the same InfoProvider. In order for this to be possible, you need to save them as reusable(global)structures.
    In order to make a distinction, we call structures that are not stored as reusable
    structure local structures. Local structures are only used in one query
    <b>
    Creating structure:</b>
    Call up the context menu in the heading of the Rows or Columns directory.
    Choose New Structure.
    In the context menu of the new structure, choose New Selection. In the New
    Selection dialog box, use drag and drop to choose characteristics and key figures
    of the InfoProvider that you want to use in the new structure. Restrict one
    characteristic or key figure. Define a new formula for calculations.
    Select the structure that you want to reuse. Choose Save as. from the context
    menu (right mouse-click) and enter a technical name and a description.
    2. The saved structure is now available in the structure directory of the InfoProvider
    tree. You can use the structure for the definition of new queries for this
    InfoProvider.
    <b>Note:</b> Changes made later to global structures affect all queries in which they
    were used. If you only want to make local changes in a particular query, you
    can choose Remove Reference in the context menu for the structure, and
    thereby, change the reusable structure into a local structure.
    Changes made later do not affect the definition of the reusable structure, nor
    the queries that you made with this reusable(Global) structure.
    Hope this helps,
    Thanks,
    Sudhakar

  • Line type and structure.

    What is the difference between line type and structure?
    one real time use of both.
    instead of line type we can directly use the corresponding tables.
    Points assured.
    regards,
    Prabhu.

    Hi
    <b>The line type of a table type can be defined by:</b>
    Specification of a type that already exists (data element, structure, table type, table, view) whose properties are then copied as properties of the defined table line.
    Direct type input, where data type, number of positions, and, if required, decimal places, are entered directly.
    Specification of a reference type.
    <b>structure</b>
    The table category defines how the logical table description defined in the ABAP Dictionary is represented in the database.
    There are the following table categories:
    transparent table
    structure
    append structure
    For internal purposes, such as storing control data or update texts, there are in addition the following table categories:
    pooled table
    cluster table
    generated view structure
    <b>reward if usefull</b>

  • Simple types and structure

    Hi
    can any one tell me Difference between simple types and structure ?
    Thanks,
    Kiran

    Hi Ravi,
            As my concern  there is difference between simple type and structure.
            1SIMPLE TYPEit behave as TYPE  proprty of value attibute .suppose you will create on value attribute as simAtt.then you can put that simple type in your attribute TYPE property .actualy it treated as data type like  string,integer........
    one more thing you want to change data type in your application then you will create SIMPLE TYPE..then put  it TYpe property of value  Attribute
    Ex--you want to change the format of double value using "," then you will change only by  using simple type.
    STRUCTURE---Basically it use for creating for context value node in any context of controller(View,component )if you creat one structure then add  number of attribute .when you create context value node then you binding the structure then automatically it will populate with value node as structure name and attribute .
    SIMPLE TYPE---only put as Data type of Attribute and simple type also use within Structure at time of creation
    STRUCTURE---you can use for DAta type of Apptibute..
    thanks
    Jati

  • How to pick the wage type (repeat structure) in pa0008 infotype and Pa0014.

    Hi all.
         Iam writing code we pick the data from Pa0008-lgart Pa0008-brt01.
        these two field are repeat structure.
       here iam given code what we writen.
    select pernr
              lgart
              betrg
                from pa0014
                into table it_p0014
              for all entries in it_p0001
                where pernr = it_p0001-pernr.
               and   it_p0014-lgart  = '1507'
               or   it_p0014-lgart = '1508'
               or   it_p0014-lgart = '1509'.
    if sy-subrc ne 0.
      message e063.
    endif.
    select pernr
           lga01
           bet01
             from pa0008
             into table it_p0008
             for all entries in it_p0001
             where pernr = it_p0001-pernr.
    if sy-subrc ne 0.
      message e063.
    endif.
    ***---> Using wage types.
    DO 20 TIMES VARYING lgart FROM it_p0008-lgart NEXT it_p0008-lgart
                VARYING betrt FROM it_p0008-betrg NEXT it_p0008-betrg.
    case lgart.
        when '1001'.        " HOURLY RATE.
          write:/ it_p0008.
        when '1500'.        " HOURLY RATE.
          write:/ it_p0008.
        when '1008'.        " RED CIRCULE HOURLY RATE.
          write:/ it_p0008.
    endcase.
    ENDDO.
    here i am getting o/p it featch the all the data.
    but i need only  1001,1500and 1008 records only.
    here iam using DO varing condition.
    please help me.
    and one more thing
    as well i featch the data from 14 infotype same lgart and betrg
    in 00014 infotype i need only 1507,1508,1509 recorde along with betrg.how to write code .  
    Regards,
    Krishna.

    DO 20 TIMES VARYING lgart FROM it_p0008-lgart NEXT it_p0008-lgart
    VARYING betrt FROM it_p0008-betrg NEXT it_p0008-betrg.
    WRITE:/ lgart, betrg.
    <b>case LGART.
    when '1001'. " HOURLY RATE.
    write:/ betrg.
    when '1500'. " HOURLY RATE.
    write:/  betrg.
    when '1008'. " RED CIRCULE HOURLY RATE.
    write:/  betrg.
    endcase.</b>ENDDO.
    check this.
    Regards
    Prabhu

  • How to pick the wage type (repeat structure) in pa0008 infotype.

    Hi all.
         Iam writing code we pick the data from Pa0008-lgart Pa0008-brt01.
        these two field are repeat structure.
       here iam given code what we writen.
    select pernr
              lgart
              betrg
                from pa0014
                into table it_p0014
              for all entries in it_p0001
                where pernr = it_p0001-pernr.
               and   it_p0014-lgart  = '1507'
               or   it_p0014-lgart = '1508'
               or   it_p0014-lgart = '1509'.
    if sy-subrc ne 0.
      message e063.
    endif.
    endif.
    ***---> Using wage types.
    *loop at it_p0008
    DO 20 TIMES VARYING lgart FROM it_p0008-lgart NEXT it_p0008-lgart
                VARYING betrt FROM it_p0008-betrg NEXT it_p0008-betrg.
    WRITE:/ lgart, betrg.
    case it_p0008-lgart.
        when '1001'.        " HOURLY RATE.
          write:/ it_p0008.
        when '1500'.        " HOURLY RATE.
          write:/ it_p0008.
        when '1008'.        " RED CIRCULE HOURLY RATE.
          write:/ it_p0008.
    endcase.
    ENDDO.
    here i am getting o/p it featch the all the data.
    but i need only  1001,1500and 1008 records only.
    here iam using DO varing condition.
    please help me.
    and one more thing
    as well i featch the data from 14 infotype same lgart and betrg
    in 00014 infotype i need only 1507,1508,1509 recorde along with betrg.how to write code .  
    Regards,
    Krishna.

    DO 20 TIMES VARYING lgart FROM it_p0008-lgart NEXT it_p0008-lgart
    VARYING betrt FROM it_p0008-betrg NEXT it_p0008-betrg.
    WRITE:/ lgart, betrg.
    <b>case LGART.
    when '1001'. " HOURLY RATE.
    write:/ betrg.
    when '1500'. " HOURLY RATE.
    write:/  betrg.
    when '1008'. " RED CIRCULE HOURLY RATE.
    write:/  betrg.
    endcase.</b>ENDDO.
    check this.
    Regards
    Prabhu

  • How to define a generic structured type (deep structure) w/o LIKE

    Hi,
    I have been trying to define a generic structured type that would include a component (field) of type "table type".
    Look at my type [ty_compatibilite].  It is the structured type that needs to have a component called "mobile" which needs to be an internal table.  I have tried to create a genereic table type called tt_mobile (based on ty_mobile) but that did not work. I have not been able to avoid using the LIKE command to make it work.
    Any suggestions on how I could define my component "mobile" without using a "LIKE"... ?
    Here is my code:
    TYPES: BEGIN OF ty_mobile,
              ref_mob_sfr    TYPE zmobil,
              ref_mrq_sfr    TYPE zmarq,
              type_compat    TYPE zsea_comp_type,
           END OF ty_mobile.
    TYPES: tt_mobile TYPE STANDARD TABLE OF ty_mobile.
    DATA: lit_mobiles TYPE STANDARD TABLE OF ty_mobile.
    TYPES : BEGIN OF ty_compatibilite,
              cod_ean        TYPE ean11,
              lib_art        TYPE maktx,
              compat_all_mrq TYPE zsea_comp_gen,
    *          mobile        TYPE tt_mobile,
              mobile         LIKE lit_mobiles,
            END OF ty_compatibilite.
    TYPES : tt_compatibilite   TYPE STANDARD TABLE OF ty_compatibilite.

    define key or use default one:
    TYPES: tt_mobile TYPE STANDARD TABLE OF ty_mobile with DEFAULT KEY.
    If you don't specify key the type is treated as generic

  • Error on extended check for types include structure statements

    Hi All ,
                  On Extended check im getting error :
    Program:  ZFIR_VALUATE_OBSOLETE_STOCK  Include:  ZFIR_VALUATE_OBSOLETE_STOCK_F  Row:   1205
    The current ABAP command is obsolete
    Within classes and interfaces, you can only use "TYPE" to refer to ABAP Dictionary
    types, not "LIKE" or "STRUCTURE".
    Internal Message Code: MESSAGE G/B
    (The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET
    EXTENDED CHECK OFF/ON)
    The error is in below line :
    TYPES: BEGIN OF t_fttax.
              INCLUDE STRUCTURE fttax.
      TYPES: END OF t_fttax.
    and fttax is a dictionary strucuture . i made internal table and work area using it .
    DATA: i_fttax TYPE STANDARD TABLE OF t_fttax,
            wa_fttax TYPE t_fttax.
    Need Help ,what i should do to remove this error ?
    Regards

    declare as :
    DATA: i_fttax TYPE STANDARD TABLE OF fttax,
               wa_fttax TYPE fttax.
    No need to declare as :
    TYPES: BEGIN OF t_fttax.
              INCLUDE STRUCTURE fttax.
      TYPES: END OF t_fttax.

  • Dynamic Type creation: structure

    Hey,
    I made a dynamic table and now I want to loop this table.
    But I can't seem to make a structure to use in the loop.
    I get the error 'data object has no structure'.
    This is what I already have.
    data: linetype   type ref to cl_abap_structdescr,
            tabletype  type ref to cl_abap_tabledescr,
            lt_comp    type cl_abap_structdescr=>component_table,
            lr_table type ref to data,
            lr_line type ref to data.
    field-symbols: <lt_data> type table,
                         <ls_data> type any.
    ...first I fill lt_comp ...
    linetype = cl_abap_structdescr=>create( lt_comp ).
    tabletype = cl_abap_tabledescr=>create( p_line_type = linetype p_table_kind = 'S' ).
    create data lr_table type handle tabletype.
    assign lr_table->* to <lt_data> casting type handle tabletype.
    create data lr_line like line of <lt_data>.
    assign lr_line->* to <ls_data> casting type handle linetype.
    ... filling the table <lt_data> ....
    loop at lt_data assigning <ls_data>.
      ... when I try to access a field of <ls_data>, I get the error '<ls_data> is no structure'.
    endloop.

    Hello Steven
    If you are going for dynamic programming then you have to use "the full monty" meaning field-symbols for:
    - itab
    - structure    AND
    - fields
    FIELD-SYMBOLS:
      <ld_fld>    TYPE any.
      LOOP AT <lt_data> ASSIGNING <ls_data>.
        UNASSIGN <ld_fld>.
        ASSIGN COMPONENT '<name of field  OR sy-index>' OF STRUCTURE <ls_data>
                                                                                    TO <ld_fld>.
       IF ( <ld_fld> IS ASSIGNED ).
    "   do something...
       ENDIF.
      ENDLOOP.
    Regards,
        Uwe

  • BAPI Table parameter of type a structure  without word BAPI

    Hi Experts,
    Is it possible to have a Table parameter in a BAPI  which is such a structure type that does not contain word 'BAPI' ?
    like 
    .........Parameter Name.........................Type  Spec....................Associated Type..........................Short text
    ..............ITAB......................................LIKE................................. ZSTRUCT...................." ZSTRUCT does not contain word 'BAPI'
    Thanks & Regards,
    Biswajit
    Edited by: Biswajit Das on Aug 16, 2009 9:47 AM

    Hi ,
       your BAPI structure name shold be like this "ZBAPI_STRUCT"  , then only you can add FM to API method. Your structure name should start with ZBAPI.
    Regards,
    Pradip

  • Compnent and compnent type in structure.

    Hi Gurus,
    I am trying to create a neew structure. In the structure, for the compnent name Item, I want to give the field vbdpa-kwmeng.
    Here vbdpa is another standard structure.
    Can someone please help.
    Thanks and Regards,
    Srihari.

    Do you want to assign the WHOLE structure to the field ITEM, or just the field KWMENG from this structure. If the latter is the case, than determine what the data type of VBDPA-KWMENG is, and assign enter this datatype for the item. If you want to use the whole structure  (no likely I guess), than just enter VDBPA and do not use the FIELD kwmeng.

Maybe you are looking for

  • Check table TFBEFU_CR: entry 10   does not exist

    Dear all When i am doing GR for Order (T.Code : MB31),the system displays the following message. Check table TFBEFU_CR: entry 10   does not exist plz give me the solution as early as possible,bcaz it is very urgent to me. Thanks in advance. Regards B

  • How can i delete shared gmail calendars on my Mac's calendar?

    Hello, My company's email, calendar, etc is set up with the Google Apps. I created a Gmail account in my Mac (Running Yosemite) so I could sync the Calendar. In the Gmail calendar, you can view calendars from teammates additional to your own to make

  • Photoshop CS6 Crashing When Opening Files

    So it just crashes. Whenever I open it straight up crashes. I can open the program, but I can't do anything useful with it.

  • Increase Scope of CTE?

    I am really starting to like CTEs. My only qualm is that you can only use them within the first statement after you declare them. I wish they would remain active for the duration of the sql batch just like everything else (variables,local temp tables

  • 16:9 questoin nd droppd frame question

    i am new to having a camera with 16:9 but not at all new to fcp soo this is kinda a dumb question i think but need an answer... what is the best way to have the final outcome be in a 16:9 wide screen file... my camera (dvc30) has 4:3 16:9 squeezed an