Problem with the field-symbols

Hi all,
        i am unable to delete the  data in the internal table.
        i am sending the code.
      BEGIN OF t_oprtn,
       budat LIKE afru-budat,
       vornr LIKE afru-vornr,
       grund LIKE afru-grund,
       gmein LIKE afru-gmein,
       gmnga LIKE afru-gmnga,
       expfl(1),
       END OF t_oprtn,
FIELD-SYMBOLS: <fs_collect>         TYPE STANDARD TABLE.
FIELD-SYMBOLS: <fs_wa_collect>      TYPE ANY.
    CREATE DATA i_collect TYPE STANDARD TABLE OF t_oprtn
                          WITH DEFAULT KEY.
    CREATE DATA wa_collect TYPE t_oprtn.
  ASSIGN i_collect->*       TO <fs_collect>.
  ASSIGN wa_collect->*      TO <fs_wa_collect>.
  SELECT abudat avornr agrund  aarbid astokz darbpl a~aufnr
         bplnbez cmaktx agmnga agmein
         INTO TABLE i_final
         FROM afru AS a INNER JOIN afko AS b
                                   ON aaufnr = baufnr
                        INNER JOIN makt AS c
                                   ON bplnbez = cmatnr
                        INNER JOIN crhd AS d
                                   ON aarbid = dobjid
         WHERE a~budat IN s_budat
LOOP AT i_final INTO wa_final.
  MOVE-CORRESPONDING wa_final TO <fs_wa_collect>.
    COLLECT <fs_wa_collect> INTO <fs_collect>.
  ENDLOOP
how to write a delete statement for -  <fs_collect>.
Plz tell me the delete statement where GMNGA is '0'.   " GMNGA IS A CONFIRM QUANTITY.
Plz reply its urgent.
Edited by: hari prasad on May 30, 2008 1:15 PM
Edited by: hari prasad on May 30, 2008 1:20 PM

Try:
field-symbols: <f_temp> type any.
loop at <fs_collect> assigning <fs_wa_collect>.
   assign component 'GMNGA' of structure <fs_wa_collect> to <f_temp>.
if <f_temp> is initial.
   delete <fs_collect>.
endif.
endloop.
regards,
S. Chandramouli.
Edited by: Chandramouli Subburathinam on May 30, 2008 5:08 PM

Similar Messages

  • Problem with the program symbols in quality

    Dear all,
    I am facing a problem with the program symbols.
    I have added new global fields in development, i have called those definations in text names. It is working fine.
    After transporting these  program changes in to quality these new global definations are not displaying in quality and varibles are not working.
    Please give me some suggestion.
    Thanks and advance

    Hi Chandra,
    Please check the following.....
    (1)The transport request status in se10 and see if has been successfully imported to QA..
    (2)if all the declarations or code have been collected in a Transport and not saved as temporary objects
    To confirm the same we have to compare the code in quality and development and see if they are the same
    Pls check and revert
    Regards
    Byju

  • Problem with DESCRIBE field-symbol statement?

    Hi
    I havw written following querry but it's showing error. My doubt is there any resctriction field symbols in DESCRIBE query.
    i wrote
    describe field <a> type typ  length in character mode.
    Is that syntax correct?

    When you use the Describe statement with the field symbols, it will do the describe on the field which was assigned to it.
    Like:
    FIELD-SYMBOLS: <fs> TYPE ANY.
    DATA: l_char TYPE char10.
    l_char = 'TEST'.
    ASSIGN l_char TO <fs>.
    DATA: l_len TYPE i.
    DESCRIBE FIELD <fs> LENGTH l_len IN CHARACTER MODE.
    write: / '<fs>:', <fs>.
    WRITE: / 'Length', l_len.
    Here descirbe gives the property of the L_CHAR because it was assigned to field symbol <FS>.
    Regards,
    Naimesh Patel

  • Problem with slis_t_specialcol_alv Field Symbol Assignment

    I have created a dynamic internal table (runtime determined number of columns) to contain data to be displayed in an ALV. I’ve also made ensured that the last column of the dynamic itab is of type <b>'slis_t_specialcol_alv'</b> and named <b>‘CINFO’</b> to contain color information for that particular row. In the code below the dynamic itab is pointed to by field symbol <dyn_table> while the work area for it would be <dyn_wa>.
    Somewhere down the line I attempt to assign the ‘CINFO’ component of the current row of the itab to a field symbol called <fs_cinfo> typed as ‘slist_t_specialcol_alv’ (Same as CINFO).
    I used the code:
    ASSIGN COMPONENT 'CINFO' OF STRUCTURE <dyn_wa> TO <fs_cinfo>.
    This gives me the runtime error:
    <i>Type conflict in the ASSIGN statement in the program "ZHRR001_TEMMATRIX".
    You attempted to assign a field to a typed field symbol,
    but the field does not have the required type.    </i>     
    I am unsure why this happens as both the component CINFO and FS <fs_cinfo> are of type slist_t_specialcol_alv.
    For some odd reason though during debugging, I took a look at the <dyn_wa> structure and the component type of CINFO was displayed as “C”???
    Here is the relevant portion of code (creation of dynamic itab and attempting to assign <fs_cinfo>)
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                   <dyn_wa>.
    FIELD-SYMBOLS: <fs_cinfo> TYPE slist_t_specialcol_alv.
    DATA: lw_cinfo TYPE slis_specialcol_alv.
    DATA:          li_fldcat TYPE lvc_t_fcat,
                   lw_fldcat TYPE lvc_s_fcat.
    *Create internal table fields (they will be called Field1, Field2, etc)
    *Last column will be named 'CINFO' to contain row color information
    DO l_alvcolumncount TIMES.
      index = sy-index.
      IF index <> l_alvcolumncount.
        CLEAR lw_fldcat.
        CONCATENATE 'Field' index INTO lw_fldcat-fieldname .
        CONDENSE lw_fldcat-fieldname NO-GAPS.
        lw_fldcat-datatype = 'STRING'.
    *    lw_fldcat-intlen = 5.
        APPEND lw_fldcat TO li_fldcat .
      ELSE.
        CLEAR lw_fldcat.
        lw_fldcat-fieldname = 'CINFO'.
        CONDENSE lw_fldcat-fieldname NO-GAPS.
        lw_fldcat-datatype = 'slis_t_specialcol_alv'.
        APPEND lw_fldcat TO li_fldcat.
      ENDIF.
    ENDDO.
    * Create dynamic internal table and assign to FS
    CALL METHOD cl_alv_table_create=>create_dynamic_table
      EXPORTING
        it_fieldcatalog = li_fldcat
      IMPORTING
        ep_table        = new_table.
    ASSIGN new_table->* TO <dyn_table>.
    *Create dynamic work area and assign to FS
    CREATE DATA new_line LIKE LINE OF <dyn_table>.
    ASSIGN new_line->* TO <dyn_wa>.
      ASSIGN COMPONENT 'CINFO' OF STRUCTURE <dyn_wa> TO <fs_cinfo>.
    * Color this cell
      lw_cinfo-fieldname = fieldname.
      lw_cinfo-color-col = 6.
      APPEND lw_cinfo TO <fs_cinfo>.
    Message was edited by: Sow Yong Wong

    Hello Sow
    There is a big problem in the program: you are mixing types used for FM-based ALV (SLIS_...) and ABAP-OO based ALV (LVC_...).
    For ABAP-OO based row colouring you have to define your itab like this:
    TYPES: ty_s_outtab.
      INCLUDE TYPE kna1. " just an example
    TYPES: rowcolor(4)  TYPE c.
    TYPES: END OF ty_s_outtab.
    TYPES: ty_t_outtab TYPE STANDARD TABLE of ty_s_outtab
                       WITH DEFAULT KEY.
    In the layout (LVC_S_LAYO) you have to set <b>ls_layout-info_fname = 'ROWCOLOR'</b>.
    ROWCOLOR has to be filled according to <b>Cxyz</b> whereas
    - x = color
    - y = inverse on/off
    - z = intensified on/off
    For documentation please refer to <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907">An Easy Reference to ALV Grid Control</a>
    Regards
      Uwe

  • Problem with the field length restrictions in the WSDL file

    Hi all,
    We have created a XSD file where we have defined fields and given some restrictions (like minLength, maxLength) for each field. See below one ex of one element "Id":
    {code     <xs:simpleType name="Id">
              <xs:restriction base="xs:string">
                   <xs:maxLength value="40"/>
              </xs:restriction>
         </xs:simpleType>
    {code}
    Here we have defined maxLength of this field as 40 chars. Our WSDL uses (refers/import) this XSD file and we ganerates java skeleton using RAD. But at runtime if we set more than 40 chars then also it is accepting. It is not throwing an exception. (In the generated java skeletion these restrictions are not reflected antwhere)
    I have one question that, if such restrictions defined in the XSD file works or not? and is it a industry standard to define restriction in the XSD file?
    If yes then what i need to do more to make it working?
    If not then is there any way to do such validation of the fields that are input to the webservice? Or shall i have to just write my own java class to validate each field?
    Regards,
    Ravi

    Or is it possible that we give length restrictions in the XSD (and import this XSD in WSDL) and generate java skeleton from WSDL then the restrictions defined in XSD are mapped into java classes?
    For ex:
    <xs:simpleType name="Id">
        <xs:restriction base="xs:string">
            <xs:maxLength value="40"/>
        </xs:restriction>
    </xs:simpleType>so when in generated java skeleton we set value to "Id" element which is more than 40 charsthen it should throw a exception?
    Is it possible by default or do we need to write custom validation classes to do validations on such fields?
    Has anybody worked in such scenerios?
    Or how to do field validations in webservice? Simple question.
    Thanks In Advance.

  • Problems in transaction F871,with the field  docuemnt type:

    Hello,m
    I´m trying to create a Payment Request with transaction F871,and I have a problem with the field docuemnt type that is mandatory, when I try to open the match code there is no values, and a message is displayed as follows: " No document type assigned to request category 01 "

    Hello Olga,
    Thanks for your words in the other thread. In any case your english is perfect, it is not my mother language also so apologize my errors too
    Please check if you have done this customizing:
    SPRO -> Public Sector Management -> Funds Management Government -> Funds Management-Specific Postings -> Requests -> Request Types -> Assign Request Category to FI Document Type
    I hope it helps.
    Greetings from Brazil
    Vanessa.

  • Problems with the interlaced Fields after burning with iDVD

    The original quicktimes have interlaced frames and once I burn them with iDVD seams that there is a problem with the fields, like they are in ht ewrong order or something.
    Is there something I'm not doing right?
    Anyone?
    jd

    I Have a similar problem my apple health app hasn't worked from day one - I use my fitness pal and no matter what I do it just doesn't communicat or pass information to apples app - ive even tried a different steps app and that doesn't communicat either. Even running on ISO 8.2 hasn't  rectified connectivity issues.
    I Wonder if apple is aware of these issues lol

  • Modifying  the Ad-hoc Query Infoset : problem with P9105 fields.

    Hi all,
    Am having problem with Infoset of Ad-hoc Query .
    i need to add the Critical role Field Group to ZHR_PA_01 Infoset of Satandard Area.
    for this i have imported that Infotype 9105 and included the following standard fields by drag and drop.
                    1. Role Category
                    2. Role SubCategory
                    3. Global Identifier 
                    4. Personnel Number
    and then Saved and Generated the infoset succesfully.(No syntax errors)
    But
    While testing, using the T-Code:  S_PH0_48000510
    if i select one of these above fields for the report,
    Am getting the message that "Error when generating the report".
    Error Description:The report cannot be generated because the internal description is invalid or incomplete.
    means what may be the problem.?
    if i select other fields its working fine.
    can any body explain me clearly..??
    Regars,
    Kalam A.

    Hi Manoj,
      yes, i have saved the T-code.and generated the Infoset Succesfully.
    and its showing the those additional fields while testing.
    for remaining fields its working fine.
    but am not getting wats problem with the four fields of P9105 infotype.
    could you please suggest me.?
    Regards,
    Kalam A.

  • Problem with the quantity field

    hi every one
    i am facing a problem with the quantity field (vbap-kwmeng)
    as per my requirement i need to display this quantity field along with some other item fields from VBAP in an alv grid.
    among all the fields displayed in the alv grid only this quantity field is editable(end user can change this quantity)
    once end user changes this quantity and press save button i need to capture this new quantity in my internaltable.
    problem is input of length of quantity is 15 and the output length is 19
    so when i am pressing save
    say my quantity is 50 when i am pressing save '0.050' is coming because of the length difference
    how can i capture the original changed value.
    vamsi

    what about define two fields in  you inner table ,one as char and the other as vbap-kwmeng, you can show the char one in the ALV gird , when user input value and press SAVE ,you can move the value to vbap-kwmeng.
    you can test it,mybe some one has one better idea.

  • Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .

    Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .

    Hi Chhayank,
    the problem is not the exported xls. If you have a look inside with Notepad or something like that, you will see that your leading zeros are exported correct.Excel-settings occurs this problem, it is all about how to open the document. If you use the import-assistant you will have no problems because there are options available how to handle the different columns.
    Another solution might be to get familiar with ABAP2XLS-Project. I got in my mind, that there is a method implemented, that will help you solving this problem. But that is not a five minute job
    ~Florian

  • I have a problem with the keyboard on my MacBook. The letters are typing as symbols and the delete and return/enter buttons do not work. Does anybody know how to fix this?

    I have a problem with the keyboard on my MacBook. The letters are typing as symbols and the delete and return/enter buttons do not work. Does anybody know how to fix this?

    Hey skyshade13,
    Thanks for the question. The following article outlines how to restore a previous iTunes library should there be no content after updating. While the article does not speak specifically to your symptoms, attempting the steps by utilizing the "Previous iTunes Libraries" folder may resolve your issue.
    No content shows up in iTunes after updating
    http://support.apple.com/kb/TS1967
    For further information see the following information:
    OS X Lion: iTunes opens to "created by a newer version" alert
    http://support.apple.com/kb/TS3918
    iTunes: How to re-create your iTunes library and playlists
    http://support.apple.com/kb/HT1451
    Thanks,
    Matt M.

  • Problem with the% deviation from Project Server 2010 field

    hello
    I have a problem with the% deviation from Project Server 2010 field.
    Within a file or project, this project contains tasks.
    Each task has completed the field% deviation.
    Within the row "Summary" in the field of% deviation does not perform the sum of all fields of tasks.
    Only occurs on certain projects, these projects have the view of PR Progress Report
    Anyone know happens?
    thank you very much

    Hi
    Sorry, I'll be more specific now.
    Within the field% deviation. Your settings in PWA is:
    The formula for field% Deviation:
    Str (IIf ([Job baseline] = 0; IIf ([Working] = 0, 0, 100); IIf ([Working] = 0; -100; Int (100 * ([Job] - [Work Online base]) / [Working baseline])))) + "%"
    Under the heading rows Calculation Summary:
    > Use formula.
    Within the field Allocation Calculation of rows:
    > It is labeled the "Apply unless you manually specify".
    The field [Job] and field [Job baseline] are fields Pack project server.
    The error is in project, in the list of tasks.
    In the top row, this row summary makes the sum of the ranks of the tasks of the file.
    But in my case only in the summary field the same value appears in the tasks.
    In all the cells in column% deviation appears the same value.
    I hope it helps.
    thank you very much

  • Problem with the hierarchial fields in a Purchase order xml report

    Hi,
    I am having a problem with the hierarchy problem. We are populating attribute 15 of a PO header. some times it can be null. FYI, we are using 11.5.10 instance where oracle supports direct PO template rather than having a rdf file.
    And now in the xml report, if attribute15 of po header is not null then it is fine.
    But if attribute15 is null, then the template is picking from the next available attribute15 that is from the po lines. As the line level group of "LINES" is between the "PO_DATA" (header group), hence the template is checking for next available attribute15.
    Can any one please suggest how to design the template where we can make the template to check only for that tag at the header level group rather than the line level group tag?
    Thank You in advance.
    Regards,
    Srinivas.

    Hi
    Incase you want to transfer attachements from SRM to R/3, then you try implementing the BADI in SRM side. The BADI which will help in this case is
    <b>BBP_CREATE_PO_BACK</b> BADI.
    <b>Please read the standard SAP documentation of this BADI using SE18 Transaction, before making any code changes.</b>
    <u>Few Important SAP OSS notes to refer in this case -></u>
    Note 989184 - Transferred shopping cart with internal attachments
    Note 550071 - FAQ: EBP - Shopping Cart
    Note 916347 - Transfer shopping cart with internal attachments
    Note 1001130 - FAQ - Attachment questions (Buyside)
    <u>Few useful links -></u>
    <b>http://help.sap.com/saphelp_srm50/helpdata/en/49/b32640632cea01e10000000a155106/frameset.htm
    Re: Attachments to backend
    Re: Document Attachments in Shopping Cart
    Re: Attachment in SRM
    Re: SRM Documents and Attachments
    Re: Limit in Attachments of an item in Shopping Cart
    Re: return delivery text from material document is not passed to SUS
    </b>
    Do let me know, incase you face any problems.
    Regards
    - Atul

  • How to change the Field Symbol, so Adobe Forms takes it as a Table?

    Hi guys,
    I created an Field Symbol, in a Interface which I use for Adobe Forms. The type of the Field Symbol is STANDARD TABLE, and this field symbol I fill with data from another program.
    But the problem is that in adobe forms, this Field Symbol is taken as TEXT FIELD and not as Table... and this shows me a Dump because it can't convert Internal Table to type C (the dump is like that).
    What I need, is how to change the Field Symbol, so Adobe Forms takes it as a Table?
    I looked at Adobe Form, and found this:
    The Type Category of the Field Symbol is DICTIONARY TYPE and I think I need to change it to Internal Table as shown in the right picture.
    Does someone have any idea?

    Hello Taly,
    To what i understand your requirement, you need to pass data from Field symbol to internal table in Adobe form.
    You have done it correct partially. I have replicated your scenario and steps are below -
    1) Create a Z structure
    2) Create Z Table Type
    3) Create Adobe Interface with Table & Field Symbol. Also do coding as shown to assign the internal table populated in driver program to filed symbol.
    4) Design Form as -
    5) Code driver as -
    *& Report  ZR_AF_FS_1
    REPORT  zr_af_fs_1.
    DATA: fm_name           TYPE rs38l_fnam,
           fp_docparams      TYPE sfpdocparams,
           fp_outputparams   TYPE sfpoutputparams,
           it_kna1           TYPE ztt_fs_1.
    * Sets the output parameters and opens the spool job
    CALL FUNCTION 'FP_JOB_OPEN'                   "& Form Processing: Call Form
       CHANGING
         ie_outputparams = fp_outputparams
       EXCEPTIONS
         cancel          = 1
         usage_error     = 2
         system_error    = 3
         internal_error  = 4
         OTHERS          = 5.
    IF sy-subrc <> 0.
    *            <error handling>
    ENDIF.
    *&---- Get the name of the generated function module
    CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'           "& Form Processing Generation
       EXPORTING
         i_name     = 'ZAF_FS_1'
       IMPORTING
         e_funcname = fm_name.
    IF sy-subrc <> 0.
    *  <error handling>
    ENDIF.
    *-- Fetch the Data and store it in the Internal Table
    SELECT kunnr name1 name2 adrnr FROM kna1 INTO TABLE it_kna1 UP TO 15 ROWS.
    * Language and country setting (here US as an example)
    fp_docparams-langu   = 'E'.
    fp_docparams-country = 'US'.
    *&--- Call the generated function module
    CALL FUNCTION fm_name
       EXPORTING
         /1bcdwb/docparams        = fp_docparams
          it_data                   = it_kna1
    *    IMPORTING
    *     /1BCDWB/FORMOUTPUT       =
       EXCEPTIONS
         usage_error           = 1
         system_error          = 2
         internal_error           = 3.
    IF sy-subrc <> 0.
    *  <error handling>
    ENDIF.
    *&---- Close the spool job
    CALL FUNCTION 'FP_JOB_CLOSE'
    *    IMPORTING
    *     E_RESULT             =
       EXCEPTIONS
         usage_error           = 1
         system_error          = 2
         internal_error        = 3
         OTHERS               = 4.
    IF sy-subrc <> 0.
    *            <error handling>
    ENDIF.
    6) Output -
    BR.

  • Problem related to field-Symbol?

    HI All,
    I am writting the below coding, Please tell me whether the Field Symbol will act as a table or not as I want to append a lot of data to field symbol. Please tell me is there any problem in the code.
    LOOP AT lt_vepoequi_keys into ls_vepoequi_keys.
            READ TABLE lt_vekp ASSIGNING <ls_vekp_str> with key
              matnr = ls_vepoequi_keys-matnr.
            IF sy-subrc = 0.
              <ls_vekp_str>-stoff = ls_vepoequi_keys-stoff.
              <ls_vekp_str>-sonum = ls_vepoequi_keys-sonum.
              <ls_vekp_str>-lagkl = ls_vepoequi_keys-lagkl.
              <ls_vekp_str>-lagkt = ls_vepoequi_keys-lagkt.
    endif.
    endloop.

    Hi Abhinav,
    you have internal table (say it_employee) with fields name,age,senior_category.
    now when you loop this internal table you will need workarea.
    loop at it_employee into wa_employee.
                      if wa_employee-age > 60.
                            wa_employee-senior_category = 'YES'.
                      else.
                              wa_employee-senior_category = 'NO'.
                      endif.
                              modify it_employee from wa_employee. 
                     endloop.
    now one use of Field-symbols is : when internal table is huge and when you loop with workarea and modify internal table each time, it takes time. So if we use Field-symbols performance would increase.
    loop at it_employee assigning into <fs_employee>.
                      if <fs_employee>-age > 60.
                            <fs_employee>-senior_category = 'YES'.
                      else.
                              <fs_employee>-senior_category = 'NO'.
                      endif.
                endloop.
    Now  you see in the above code, i have not used modify statement because when i loop internal table, the field symbol points directly to the memory of internal table.
    So during loop if i assign any value to the field symbol then it directly changes the internal table value, so there wont be any need to use modify statement.
    Hope you are clear with this example....
    Regards
    Sajid

Maybe you are looking for