Problem in Field Routine

Dear Experts
i have written a field route but values are not Transferring to The ODS. please check below code and let me know where the mistake is.
if SOURCE_FIELDS-KNART eq 'ZVAO' and SOURCE_FIELDS-KNVAL ne 0.
     RESULT = SOURCE_FIELDS-KNVAL.
endif.
regards
B.Virupasan
Edited by: Lankem-IT on Jul 20, 2011 8:22 AM

There is nothing wrong in selecting "overwrite" but as per your routine, your field will contain value only for those records where KNART is 'ZVAO' and KNVAL ne 0.  for other records it would be zero, so there is a possibility that the value record is being overwritten by zero records....
I guess biling doc no and item no is the key in your DSO.
say for ex if you have two records coming from source
BILL_DOCNO ITEMNO KNART KNVAL
1001       10     ZVAO   5
1001       10     ZZZZ   0
After transformation you will have values populated for the zfield in New table...
BILL_DOCNO ITEMNO KNART KNVAL ZFIELD
1001       10     ZVAO   5    5
1001       10     ZZZZ   0    0
And when you activate the request, the second record will overwrite the first record and you will get only zero....
Just check in the New table before activating the request in DSO and see if you have values populated for this routine field...
And if you dont want this to be overwritten, then set the Aggregation type to "summation".
--- Thanks...

Similar Messages

  • Problem with READ Statement in the field routine of the Transformation

    Hi,
    I have problem with read statement with binary search in the field routine of the transformation.
    read statement is working well when i was checked in the debugging mode, it's not working properly for the bulk load in the background. below are the steps i have implemented in my requirement.
    1. I selected the record from the lookuo DSO into one internal table for all entried in source_packeage.
    2.i have read same internal table in the field routine for each source_package entry and i am setting the flag for that field .
    Code in the start routine
    select source accno end_dt acctp from zcam_o11
    into table it_zcam
    for all entries in source_package
    where source = source_package-source
         and accno = source_package-accno.
    if sy-subrc = 0.
    delete it_zcam where acctp <> 3.
    delete it_zcam where end_dt initial.
    sort it_zcam by surce accno.
    endif.
    field routine code:
    read table it_zcam with key source = source_package-source
                                                 accno  = source_package-accno
                                                 binary search
                                                 transportin no fields.
    if sy-subrc = 0.
    RESULT  = 'Y'.
    else.
    RESULT = 'N'.
    endif.
    this piece of code exist in the other model there its working fine.when comes to my code it's not working properly, but when i debug the transformation it's working fine for those accno.
    the problem is when i do full load the code is not working properly and populating the wrong value in the RESULT field.
    this field i am using in the report filter.
    please let me know if anybody has the soluton or reason for this strage behaviour.
    thanks,
    Rahim.

    i suppose the below is not the actual code. active table of dso would be /bic/azcam_o1100...
    1. is the key of zcam_o11 source and accno ?
    2. you need to get the sortout of if endif (see code below)
    select source accno end_dt acctp from zcam_o11
    into table it_zcam
    for all entries in source_package
    where source = source_package-source
    and accno = source_package-accno.
    if sy-subrc = 0.
    delete it_zcam where acctp 3.
    delete it_zcam where end_dt initial.
    endif.
    sort it_zcam by surce accno.
    field routine code:
    read table it_zcam with key source = source_package-source
    accno = source_package-accno
    binary search
    transportin no fields.
    if sy-subrc = 0.
    RESULT = 'Y'.
    else.
    RESULT = 'N'.
    endif.

  • Needs sample ABAP code for field routine

    Dear Expert,
    There is a field "Pay Scale Group" in my DSO which stores the data in the format
    AA1/B1/CCC2/DD2/EEE1, A1/BB2/CC2/DDD3/EE2 etc. These data has to be transferred to
    InfoCube where "pay Scale Group" in the InfoCube will store the data like EEE1,EE2 etc.
    I need to write a field routine on the transformation between DSO and Cube.
    Can any one please help me with the sample ABAP code for this scenario.
    Some more examples for better understanding of the requirement:-
    Data in DSO(Source)            Data in Cube(Target)
    ===================            ===================
    AA1/B1/CCC2/DD2/EEE1            EEE1
    AAA1/BB2/CC1/DDD3/EE2           EE2
    A2/BBB2/CC2/DDD3/EEE5           EEE5
    AA2/BB1/C1/DDD3/EE3             EE3
    A3/B1/CC2/DDD1/EE4              EE4
    Many thanks in advance.
    Regards,
    Prakash
    Please do not dump your code requirements in SDN
    Edited by: Pravender on May 18, 2011 11:37 AM

    Hi,
    You can use the following code :
    Suppose the technical name of the field coming from DSO is ZPAY_SGRP.
    And also for example let me take one record, that is ZPAY_SGRP = AA1/B1/CCC2/DD2/EEE1 .
    My assumption is that there will always be 4 '/'.
    In the field routine write the below code
    data: V1(5) type c,
              V2(5) type c,
             V3(5) type c,
              V4(5) type c,
             V5(5) type c.
    data : VAR1 TYPE /BIC/OIZPAY_SGRP.
    split VAR 1  at '/' into V1 V2 V3 V4 V5.
    result = V5.
    V5 will be having the characters after the last '/' .That is V5 = EEE1.
    Hope the above reply was helpful.
    Kind Regards,
    Ashutosh Singh
    Edited by: Ashutosh Singh on May 17, 2011 3:53 PM
    Edited by: Ashutosh Singh on May 17, 2011 4:17 PM

  • HOw to write/Develop this Start & Field Routine

    Hi Experts,
    As i am new(Learner) to BW Please advise me on how can i achieve this and update me with Releavent Start Routine and Field Routine....please
    My Requirment is
    Employee is Compounded on Location.
    On Weekly or Monthly basis (dependending on Employee Payroll run)  Employee will be assigned with the Wage Type and Amount for that Wage Type and Payroll Date (When the payroll was run)
    Data Currently i have/Data comming from Source System
    Loc_ID--Emp_IDWage_IDPayroll_Date-Amount
    -1--99900108.08.2008-----100.00
    -1--99908808.08.2008-----560.00
    -1--99934508.08.2008-----437.00
    -1--99900108.07.2008-----654.00
    -1--99908808.07.2008-----389.00
    -1--99934508.07.2008-----893.00
    -1--99926408.06.2008-----600.00
    -1--99934508.08.2008-----365.00
    (Employee may have Different Wage_ID and Amount for each payroll)
    My requirment is to include a new key figure 'Previous_Amount' which will be populated previous Wage_ID Amount.
    Loc_ID--Emp_IDWage_IDPayroll_Date-Amount---Previous_Amount
    -1--99900108.08.2008---100.00-----654.00
    -1--99908808.08.2008---560.00--
    389.00
    -1--99934508.08.2008---437.00--
    893.00
    -1--99900108.07.2008---654.00--
    0
    -1--99908808.07.2008---389.00--
    0
    -1--99934508.07.2008---893.00--
    365.00
    -1--99926408.06.2008-----600.00
    -1--99934508.08.2008-----365.00
    As i am a starter in BW i am struggling to write start routine in transformations (DSO-->CUBE) to transfer the data in DSO Active Table to a internal table and a field routine to update Previous_Amount field by sorting the internal table data and to pick employee's latest record less than the current payroll  for that particular wage_id and populate that amout to Previous_Amount field.
    Please make necessary corrections to the start routine by fixing where i went wrong and update me with the required field routine (which will read data from internal table used in start routine.
    Start Routine
    Data: ITAB_DSOP type table of /BIC/AZDFREW200,
          WA_DSOP type /BIC/AZDFREX200.
    Data: WA_PACKAGE like line of SOURCE_PACKAGE.
    Data: L_TABIX type SY-TABIX.
    If not SOURCE_PACKAGE[] is initial.
    Sort SOURCE_PACKAGE by
    /BIC/ZLOC                          ascending
    /BIC/ZEMP_ID                      ascending
    /BIC/ZPAY_DATE                     ascending
    /BIC/ZWGE_ID                       ascending.
    clear ITAB_DSOP[].
    Select  from /BIC/AZDFREW200 into table ITAB_DSOP
    for all entries in SOURCE_PACKAGE
        Where  /BIC/ZLOC      = SOURCE_PACKAGE-/BIC/ZLOC.
               /BIC/ZEMP_ID  = SOURCE_PACKAGE-/BIC/ZEMP_ID.
               /BIC/ZWGE_ID   = SOURCE_PACKAGE-/BIC/ZWGE_ID.
               /BIC/ZPAY_DATE < SOURCE_PACKAGE-/BIC/ZPAY_DATE.
    If sy-subrc = 0.
    Sort ITAB_DSOP by
    /BIC/ZLOC                          ascending
    /BIC/ZEMP_ID                      ascending
    /BIC/ZPAY_DATE                     descending
    /BIC/ZWGE_ID                       ascending.
    if sy-subrc = 0.
    loop at SOURCE_PACKAGE into wa_package.
    l_tabix = sy-tabix.
    read table ITAB_DSOP into wa_DSOP with key
    /BIC/ZLOC = wa_package-/BIC/ZLOC
    /BIC/ZEMP_ID = wa_package-/BIC/ZEMP_ID
    /BIC/ZWGE_ID  = wa_package-/BIC/ZWGE_ID
    binary search.
    if sy-subrc = 0.
    Please update me with Start Routine and Field Routine required  to achieve my requirment
    Thanks in advance

    hii
        I created small example as ur case, for that I will explain my logic which i used and i will give the code make the necessary mofications and use in ur case
    1) First bring all the input that exist in source_package into a temporary table which we create as that of the output structue.
    2) Sort both input i.e source_package and temporary table by wage id and date ascending
    3) Next compare both of them and get the value of previous price into the temporary table from the source_package..
    4)write a routine at the field level to populate the previous_price by mappign both wage id and payroll date
    5) Between 3 step and 4 step i used one more temporary table to get the values of previous price 0
    GLOBAl PART
      types : begin of itabtype,
               job_no type /bic/oirt_jobno,
               wage_id type /bic/oirt_wgid1,
               date type  /bic/oizfrm_dt,
               prc  type  /bic/oirt_prc,
               previous_price type /bic/oirt_prc1,
            end of itabtype.
    data : itab type standard table of itabtype
                           with key wage_id date,
                wa_itab like line of itab.
    data : itab1 type standard table of itabtype
                           with key wage_id date,
                wa_itab1 like line of itab1.
    \* Create an internal table with all the field types with u want to have in the output */
    LOCAL PART
      data : wa_SOURCE_PACKAGE type tys_SC_1.
      data : tmp(2) type n value 1.
       loop at SOURCE_PACKAGE into wa_SOURCE_PACKAGE.
             move wa_SOURCE_PACKAGE-/bic/rt_jobno to wa_itab-job_no.
             move wa_SOURCE_PACKAGE-/bic/rt_wgid1 to wa_itab-wage_id.
             move wa_SOURCE_PACKAGE-/bic/zfrm_dt to wa_itab-date.
             move wa_SOURCE_PACKAGE-/bic/rt_prc to wa_itab-prc.
             append wa_itab to itab.
        endloop.
      \* The above loop is to get all the values into the internal table*/
        sort itab by wage_id ascending date descending.
        sort SOURCE_PACKAGE by /bic/rt_wgid1 ascending /bic/zfrm_dt
        descending.
        loop at itab into wa_itab.
                tmp = '1' .
                 loop at SOURCE_PACKAGE into wa_SOURCE_PACKAGE from tmp.
                      if  wa_itab-date gt  wa_SOURCE_PACKAGE-/bic/zfrm_dt
                      and  wa_itab-wage_id = wa_SOURCE_PACKAGE-/bic/rt_wgid1
                          wa_itab-previous_price =
                          wa_SOURCE_PACKAGE-/bic/rt_prc.
                          tmp = tmp + 1.
                          exit.
                       endif.
                   endloop.
         modify  itab from wa_itab.
        endloop.
        itab1[] = itab[].
        sort  itab1 by wage_id ascending date ascending.
        delete adjacent duplicates from itab1 comparing wage_id.
        loop at itab1 into wa_itab1.
           wa_itab-previous_price = '0'.
           modify itab1 from wa_itab1.
        endloop.
        loop at itab into wa_itab.
              loop at itab1 into wa_itab1.
                     if wa_itab1-date = wa_itab-date and wa_itab1-wage_id = wa_itab-wage_id.
                             wa_itab-previous_price = wa_itab1-previous_price.
                             exit.
                      endif.
                endloop.
           modify itab from wa_itab.
          endloop.
    This looks big but logic is small....
    get back to me if any queries u have
    regards
    vamsi

  • ABAP Logic in Transformations-Start or Field Routine Error

    Hi,
    Below is the field routine in transformations that will calculacte No of Years between 2 dates (Source Field & System Date)
    It is showing me no systex Error but when i started data load ,Load is failing due to below mentioned error
    Routine:
    IF NOT SOURCE_FIELDS-/BIC/ZCYB_DOB IS INITIAL.
    CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
    EXPORTING
    I_DATE_FROM = SOURCE_FIELDS-/BIC/ZCYB_DOB
    I_KEY_DAY_FROM = 00
    I_DATE_TO = SYST-DATUM
    I_KEY_DAY_TO = 00
    I_FLAG_SEPERATE = 'X'
    IMPORTING
    E_YEARS = RESULT.
    ENDIF.
    Error:
    The exception CX_STATIC_CHECK is neither caught nor is it declared in
    the RAISING clause of "EXECUTE".
    Please update me where i was doing wrong
    Thanks

    It must have something to do with your input variables - I ran this FM locally using my DOB and today's date and it worked fine.
    make sure your input date types are in the correct format for the FM.

  • ABAP Logic in Transformations-Start or Field Routine

    Hi Experts,
    As i am new to BW Please update me with the ABAP logic  i need to implement in Transformation routine...and please advise me wether i can use that as a Start or field routine for a better performance.
    Target DSO:
    DSO A : Active Table:/BIC/AZDSOA
    Fields (ZLOC,ZPAY_ID,ZNPAY_ID,ZOPAY_ID & ZCHG_DTE)
    Source DSO
    DSO B : Active Table:/BIC/BZDSOA
    (ZLOC,ZPAY_ID)
    DSO C : Active Table:/BIC/CZDSOA
    Fields (ZLOC,ZPAY_ID,ZNPAY_ID & ZCHG_DTE(date))
    While Transfering Data from DSO B-->DSO A
    It should check DSO C for that ZLOC & ZPAY_ID
    If ZCHG_DTE IS Blank then it should pick ZNPAY_ID for that ZLOC & ZPAY_ID from DSO C and update ZNPAY_ID in DSO A
    if ZCHG_DTE IS not Blank then it should pick ZPAY_ID for that ZLOC & ZPAY_ID from DSO C and update ZOPAY_ID & ZCHG_DTE in DSO A
    ZPAY_ID - Pay ID
    ZNPAY_ID -New Pay ID
    ZOPAY_ID -Old Pay ID
    ZCHG_DTE -Change Date
    ZLOC     -Location.
    Logic in words:
    If Change date is Blank then it should pick new pay id for that Location & Pay Id and update NEw pay id field in DSO A
    If Change date is not Blank then it should pick  pay id for that Location & Pay Id and update old pay id field  & change date in DSO A
    Please update me with releavent code
    Thanks

    It must have something to do with your input variables - I ran this FM locally using my DOB and today's date and it worked fine.
    make sure your input date types are in the correct format for the FM.

  • ABAP Logic/Structure for a Start and Field Routine in Transformations

    My Requirment is to export data from Data Target to Application Server.
    And for that purpose i built a APD...
    In Transformations to read data from MAster Data Table i had written below Global & Field Routine.
    Start Routine:
    Glodal Declaration
    DATA: it_dep   type standard table of /BI0/MDEPT,
          is_dep   type /BI0/MDEPT.
    LOOP AT SOURCE_PACKAGE ASSIGNING <source_fields>.
    if not SOURCE_PACKAGE[] is initial.
    SELECT * FROM /BI0/MDEPT INTO TABLE it_dep for all entries in
    SOURCE_PACKAGE
    WHERE depLOYEE    = SOURCE_PACKAGE-dep      AND
          OBJVERS     = 'A'                     AND
          DATETO     GE SY-DATUM.
    ENDIF.
    ENDLOOP.
    FIELD ROUTINE
    Clear:is_dep.
        Read table it_dep into is_dep with key
        depLOYEE = SOURCE_FIELDS-deployee binary search.
        if sy-subrc = 0.
          RESULT = is_dep-USERNAME.
        endif.
    Now for another field 'Manager' name.......
    My requirment
    Start Routine:
    (Sub Detp is an attribute to Dept and Sub Dept is referenced on dept)
    First it should copy all the Sub depts for the corresponding depts in the source field to a Temperoray table (TEMP1)
    For all sub depts in TEMP1 table it should copy manager names from dept master data table to a Temp2 table
    In start routine i need to first read temp1 and result from temp1 should be passed to temp2 and the result from tem2 can be passed to result field
    Please update

    Hi,
    i am providin you a sample code please modify it (field name and tables name's as per your requirement).
    Please write the code in transformation rule of field Emp_TDate.
    Map field Emp_SDATE  to the target field for Emp_TDATE .
        SELECT * FROM /BIC/AEMPPED00
                        WHERE Emp_SDATE NE ' '.
    if sy-subrc is initial.
    result = source_field-Emp_SDATE.
    else.
    result = ' '.
    endif.
    Please replace the emp_SDATE field with the source field name.
    But still i have some question...
    1. On what basis u decide the latest record ??
    Can u please explain scenarion bit mroe clearly.
    Thanks
    Dipika
    Edited by: Dipika Tyagi on Jun 24, 2008 8:47 AM

  • Start/Field Routine in Transformations (ABAP)

    Hi Experts
    Please update me on how to proceed and ABAP Code required.
    DSOFULL->CUBE
    DSO Active Table: /BIC/AEMPPED00
    Data In DSO
    Emp_ID--Emp_SDATE--Emp_TDate
    1-----01.01.2008
    1---01.01.2008--01.06.2008
    1-----01.01.2008
    Data Expected in CUBE
    Emp_ID--Emp_SDATEEmp_TDate-----Ter_Date
    1---01.01.2008--
    01.06.2008
    1---01.01.200801.06.2008---01.06.2008
    1---01.01.2008--
    I need a start routine or field routine that
    Will loading data from DSO to CUBE the code should look for employee latest record and if it find Emp_TDatevalue then it should populate both recordsTer_date in cube with  Emp_TDate
    Please advise

    Hi,
    i am providin you a sample code please modify it (field name and tables name's as per your requirement).
    Please write the code in transformation rule of field Emp_TDate.
    Map field Emp_SDATE  to the target field for Emp_TDATE .
        SELECT * FROM /BIC/AEMPPED00
                        WHERE Emp_SDATE NE ' '.
    if sy-subrc is initial.
    result = source_field-Emp_SDATE.
    else.
    result = ' '.
    endif.
    Please replace the emp_SDATE field with the source field name.
    But still i have some question...
    1. On what basis u decide the latest record ??
    Can u please explain scenarion bit mroe clearly.
    Thanks
    Dipika
    Edited by: Dipika Tyagi on Jun 24, 2008 8:47 AM

  • Problem with standard Routine "Seniority"

    Hi gurus,
    I have a problem with the routine "Seniority" that evaluate the length of service for the infoObject 0SRVCLEN - Length of Service. It is a standard routine in the update rule 0HR_PA_0.
    The problem occurs when the Employee has less than a year of service. The result of the routine is "0" but in the BW query "0" is interpreted like "#" - Not assigned.
    How can I change the value of the Not assigned result?
    This is the main part of the routine:
      IF NOT EMPLOYEE_WA-ENTRYDATE IS INITIAL.
        RESULT = ULTIMO0(4) - EMPLOYEE_WA-ENTRYDATE0(4).
        IF ULTIMO4(4) LT EMPLOYEE_WA-ENTRYDATE4(4).
          RESULT = RESULT - 1.
        endif.
      ENDIF.
    Thanks
    Alberto

    Sonal,
    To find the number of items please correct the code as below:
    Determine number of PO item lines
    LOOP AT TKOMV WHERE<b> KNUMV = TKOMV-KNUMV</b>
                                AND      NOT KPOSN IS INITIAL.
    AT NEW KPOSN.
    I = I + 1.
    ENDAT.
    ENDLOOP.
    Keep rest all code as it is.
    Let me know if this works,
    Thanks.

  • Accessing Global Internal Table in Field Routine Level

    I am working on a transformation. I have created a Global Internal Table with the structure of my Source Target + extra fields not in my source target. In the start routine of the transformation I am first copying all corresponding fields from SOURCE_PACKAGE to internal table and then finally doing a lot of manipulations and modifying and appending the internal table with data now ready for populating to target.
    I want to populate the target fields at field routine level by  the data present in the Global internal table. Can you please tell me how to code here. If data was being read by SOURCE_PACKAGE, I would have read the value of SOURCE_FIELDS - (Value). But incase of value to be read from Global Internal Table, can I refer to the internal table work area directly. Thanks.
    Global Internal Table - G_ITAB
    Work Area - WA_G_ITAB
    Is the below correct ?
    Result = WA_G_ITAB-(Field Name).

    Let me understand this with an example as I am still not clear. Suppose I am loading to a DSO having 17 Key Fields say K1, K2, K3.........K17.
    And if the 3.5x logic is
    DATA : L1 LIKE COMM_STRUCTURE-amt.
      CLEAR L1 .
      IF COMM_STRUCTURE-CHK = '222'
       OR COMM_STRUCTURE-CHK = '333' .
        L1 = COMM_STRUCTURE-amt .
      ENDIF.
      RESULT = L1 .
    Can you tell me the code of the above in BI7 at field level routine now. Please note I need to take data from G_ITAB internal table and that the DSO has 17 key fields?

  • Problem with field symbols in ecc 6.0

    i have the following  code  written in 4.6 version   now i am executing the old report   in 6.0  but  i am facing with some unicode error.
      FIELD-SYMBOLS:
        <line_of_bs_table> LIKE tbl1024,
       READ TABLE bs_table INDEX row_bst ASSIGNING  <line_of_bs_table> .
        buffer_bsbuffer_ptr(aux) =  <line_of_bs_table> >col_bst.
    tb1024 is standard sap structure  for storing buffer contents
    i have the following error in ecc 6.0
    structure type   '<line_of_bs_table> >+col_bst'  does not start with a charecter type  field in unicode programs in such cases
    offset/ length declarations are not allowed.
    can any one tell how can a field symbol  structure is changed  to charecter  type.

    Hi elinuk,
    you have already posted this thread in the ABAP general forum under problem in field symbols in ecc6.0 and I think that this forum is more related to this issue than the DMS forum. So please close this thread and investigate this issue further in the ABAP general forum.
    Best regards,
    Christoph

  • Very urgent : Problem with field attributes in Datasource

    Hi
    I am getting a problem with field attributes in the datasource.
    The issue came up after i modified the extract structure-i modified one field and
    added one field to the structure.Now those two fields are not visible in BW.
    When i checked with transaction rsa2, i could find that for those two fields , the
    field attribute is <b>'A'</b> which is <b>'Field in OLTP and BW Hidden by SAP'</b>.
    I tried to modify the field attribute to make it visible.Now the issue is that it is not getting reflected after transport in the Q system.What can be the issue.In the Q system its still the old value 'A' ,which makes the fields invisible.
    Please let me know what can be the issue.
    Regards
    Leon

    Hi,
    did you change this attribute via RSA2?
    you need to change your datasource via postprocessing (RSA6); then transport your DS to your Q source system.
    Replicate your datasources in your BW.
    Finally modifiy your Transfer Structure by editing your TRules ( tab Datasource/Tran structure), move your new fields from the right frame to the left frame)
    Maintain your TRules
    Activate
    hope this helps...
    Olivier.

  • Problem with field GL Account is that it shows concatenated Chart of Accoun

    Hello . Please help me. We have sap BI olap universe . problem with field GL Account is that it shows concatenated Chart of Accounts. But user want to trim the chart of account and show only account in list of values in webi report.
    So What code I can put in Universe to remove this " 9000/" WHICH IS Chart of acct from GL Account
    example List of values shows
    9000/99030
    9000/99070
    I want to show as below
    99030
    99070
    I tried replace function in universe it does not work. Pls help.
    Thanks
    soniya

    Hi,
    You can do it in Web Intelligence using the function Right().
    Depending on the SAP BW version you have it is possible to build such calculated expression in universe on uniquename or name:
    <EXPRESSION>RIGHT[0CALMONTH].currentmember.uniquename,5)</EXPRESSION>
    OR
    <EXPRESSION>RIGHT([0CALMONTH].currentmember.name,5)</EXPRESSION>
    You have to replace 0CALMONTH by the unique definition of GL Accounts and you also need to use the object referencing GL Accounts in your query in addtion to the calculated expression.
    Regatds
    Didier

  • Problem with field label

    Hello All,
    I am having a strange problem with field label? I have created a table with three fields one is MANDT and and the remaining fields as PATID and PATNA.
    I am maintaining the field label for these fields, but still i am not getting the names of the fields while i am calling the structure in my alv tree.
    I d'nt know what is the problem here?
    can any one tell me how can i solve this issue?
    Regards,
    Lisa

    Hi lisa,
    This is not the problem with Data Dictionary,
    While declaring the fieldcatalogue for thr GRID.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
      I_BUFFER_ACTIVE              =
       I_STRUCTURE_NAME             = 'ZTABLE'
      I_CLIENT_NEVER_DISPLAY       = 'X'
      I_BYPASSING_BUFFER           =
      CHANGING
        ct_fieldcat                  = gt_fieldcat
    EXCEPTIONS
      INCONSISTENT_INTERFACE       = 1
      PROGRAM_ERROR                = 2
      OTHERS                       = 3
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    If gt_fieldcat-fieldname = 'PATID'.
    gs_fieldcat-ref_field = 'ZTABLE'.
    modify gt_fieldcat from gs_fieldcat.
    clear gs_fieldcat.
    endif.
    Because while calling the FM it is populatinh the fieldname
    so you need to modify the fieldcatalogue with fieldname then it will pick the field labels from the Dictionary.
    Hope this  will solve your problem.
    Regards,

  • Problem with field  KONWA-Rate Unit(Currency or Percentage) of table KONP

    Hi Gurus,
    I m facing problem with field 'KONWA -Rate Unit (Currency or Percentage)' of table KONP. This field is showing ‘Currency’ and '%' both in table KONP. For some materials its showing currency value and for some its showing '%'. Due to which its creating load problems. My question is how this '%' is coming (means is there any calculation behind that or something else) in table KONP and how can I identify this.
    I am sure u will have the answer for this question so Thanks in advance.
    Message was edited by:
            Amit Rajput
    Message was edited by:
            Amit Rajput
    null

    Hi,
    take the following example: you sell liquor to customers; in your country, when you sell liquor your company is entitled to pay customs and excise fees to governamental authorities.
    These excises and duties are a percentage of the retail price. You'll then create such a condition record with this rate so that you calculation schema will post the correct value during the processing of billing documents...
    hope this shed light
    Olivier.
    Message was edited by:
            Olivier Cora

Maybe you are looking for