Calculate SUM based in condition in iTAB

Hi all,
I have the ITAB as follows.
wa_mseg-mblnr = '5000000130'.
wa_mseg-mjahr = '2008'.
wa_mseg-bwart = '901'.
wa_mseg-dmbtr = '00000005000'.
wa_mseg-bpmng = '00000000100'.
wa_mseg-ebeln = '1059200855'.
wa_mseg-ebelp = '00010'.
APPEND wa_mseg to itab_mseg.
wa_mseg-mblnr = '5000000131'.
wa_mseg-mjahr = '2008'.
wa_mseg-bwart = '902'.
wa_mseg-dmbtr = '00000002500'.
wa_mseg-bpmng = '00000000050'.
wa_mseg-ebeln = '1059200855'.
wa_mseg-ebelp = '00010'.
APPEND wa_mseg to itab_mseg.
wa_mseg-mblnr = '5000000132'.
wa_mseg-mjahr = '2008'.
wa_mseg-bwart = '901'.
wa_mseg-dmbtr = '00000002500'.
wa_mseg-bpmng = '00000000050'.
wa_mseg-ebeln = '1059200855'.
wa_mseg-ebelp = '00010'.
APPEND wa_mseg to itab_mseg.
now i want to add the BPMNG for the BWART = 901
                               DMBTR   for the BWART = 901
ans same thing  for the BWART = 902.
how do i calculate the SUM based on condition.

now i want to add the BPMNG for the BWART = 901
DMBTR for the BWART = 901
ans same thing for the BWART = 902.
how do i calculate the SUM based on condition.
Hi, you can loop de internal table and do a control cut by "bwart". For doing that the order of the fields of your internal table must change.
If you have:
1st.mblnr
2nd.mjahr
3rd.bwart
you have to change to:
1st.bwart
2nd.mblnr
3rd.mjahr
So in the loop you will can do like this.
loop at itab.
aux_sum = itab-BPMNG + aux_sum.
at end of bwart.
* Here you will have de SUM for BWART.
* Then you clear aux_sum for the next different BWART.
endat.
endloop.
hope this help you.
Andrew83

Similar Messages

  • Calculating the sum based on condition

    Hello Everybody,
    I am currently working on a report, where i have to calculate sum on transaction amount for all account numbers. Below is the example of data.
    masteraccount        accountno      transaction amount
    1001                        001                  50000000
    1001                        002                  50000000
    1001                        003                  50000000
    1002                        004                  98765
    1002                        005                  98765
    here i have to calculate the sum of transaction amount based on distinct master account.
    Thansk
    Ram

    create a group for master account
    use manual running totals.
    RESET
    The reset formula is placed in a group header report header to reset the summary to zero for each unique record it groups by.
    whileprintingrecords;
    Numbervar  X := 0;
    CALCULATION
    The calculation is placed adjacent to the field or formula that is being calculated.
    (if there are duplicate values; create a group on the field that is being calculated on. If there are not duplicate records, the detail section is used.
    whileprintingrecords;
    Numbervar  X := x + ; ( or formula)
    DISPLAY
    The display is the sum of what is being calculated. This is placed in a group, page or report footer. (generally placed in the group footer of the group header where the reset is placed.)
    whileprintingrecords;          
    Numbervar  X;                         
    X

  • Sum % based statistical conditions as %

    I am having some difficulty figuring out the following pricing requirement
    I have two condition types, ZPC1, ZPC2.  Both of these are % based discounts and are statistical. 
    I want to create a subtotal that sums these two conditions up as a percentage so if ZPC1 = 1% and ZPC2 = 2%, I want a line in the price procedure to say "Total Discounts Available"  3% and then the condition value is 3% x gross price. 
    When i create the subtotal, its is being converted to $/cs calculation instead of %.  How do i get the subtotal to be calculation type = V.  Note:   this line is just informational to the end user...i do not want to create a separate condition type for the subtotal.

    Hi,
    I assume that both of your '%' Discount Condition types which are statistical are w.r.t Sales Price Condition Type.
    You can add both the conditions and get the value at Subtotal.
    This will not give you the Condition Amount Total but it will give you the Condition Value Total.
    now this Subtotal value you can post though the new 'ZDIS' Condition type with 100%.
    e.g ;                                                                       Stat
    10    Pr00  
    15    ZDIS1  10                                                      x
    20    ZDIS2  10                                                      x
    25    SubTotal    15 20
    30    ZDIS           25
    I hope this could help you resolve.
    Thank You.
    RB.

  • Ssrs sum based upon a conditional statement

    In an ssrs 2008 r2 report, I have the following code that totals a transaction amount:
    =sum(cdec(Fields!TransactionAmount.Value))
    Now I need to have different total amounts based upon 'payment type'. The payment_types are either 'check', or 'credit' for credit card. Thus can you show me how to change the code I just listed to sum the amount depending upon the payment type?

    You may wish to follow this thread that is exploring a similar question.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/12e2cdf4-1fd7-4f2a-ba12-ff5c4ec01eeb/sum-values-based-on-condition-in-ssrs?forum=sqlreportingservices
    To do this in an SSRS expression just insert an IIf:
    =Sum(IIf(Fields!payment_type.Value = "check",cdec(Fields!TransactionAmount.Value),0))
    =Sum(IIf(Fields!payment_type.Value = "credit",cdec(Fields!TransactionAmount.Value),0))
    In the other thread you will see that sometimes it makes sense to do this kind of work in the dataset since dataset queries run on the datasource and often those systems are robust servers that can crunch and return data very quickly.
    "You will find a fortune, though it will not be the one you seek." -
    Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

  • How to create additional Line in file based on condition available as part of ZINVOIC02 Idoc segment

    Scenario Details:
    Receiving Zinvoic02 Idoc in PI. Idoc to file translation creates comma separated file with .csv extn
    The logic was kept in such a way that how many E1EDP01 (items) are available in IDoc that many no of records will be created in csv file.
    The file logic for some the fields is as below:
    No of records
    InvNumber
    InvDate
    CusNumber
    LineitemDesc
    Tax1Type
    Tax1%
    for 1st E1EDP01
    E1EDK01-BELNR
    E1EDK03-DATUM
    E1EDK01-PARTN
    Populate when E1EDP04/MSKWZ=O2 or O4 with E1EDP19/KTEXT
    Hardcode when E1EDP04/MSKWZ=O2 or O4
    Sum all E1EDP04 /MSATZ when E1EDP04/MSKWZ=O2 or O4
    for 2nd E1EDP01
    E1EDK01-BELNR
    E1EDK01-DATUM
    E1EDK01-PARTN
    same as above
    same as above
    same as above
    for 3rd E1EDP01
    E1EDK01-BELNR
    E1EDK03-DATUM
    E1EDK01-PARTN
    same as above
    same as above
    same as above
    Additional Line to be created when one or more of E1EDP01 is having E1EDP04/MSKWZ = O3
    same as above
    same as above
    same as above
    Hardcode "REIM for USE TAX"
    Hardcode ""
    Hardcode ""
    Now we have got addition requirement to add a new lineitem when tax code is equal to O3 for any of the E1EDP01.
    Is it possible to create additional lineitem based on condition. If yes, please share what should be the approach.
    How we can create the additional lineitem?
    Currently we are using E1EDP01 to do context handling.
    The target structure is :
    MT_FILE
         INVOICE     0..unbounded
              InvNumber     0..1
              InvDate          0..1
              CusNumber     0..1
              LineitemDesc     0..1
              Tax1Type          0..1
              Tax1%               0..1

    Hello,
    Please add one extra field in the data structure of the target mapping and let its occurrence be 0..unbounded under the root node 'MT_ADP_Invoice'.
    Apply the condition, if tax code MSKWZ (with its context changed to E1EDP01) equalsS to '03', then map it to the newly created target field whose occurrence is 0..unbounded.
    This will then create an additional field which is your requirement.
    The above is one way.
    But if you want to have the same target field name as ADP_File appended for tax field being '03'.
    Then in that case you can you two message mapping for one common operational mapping / interface.
    In the first message mapping you need to have one target data structure created with the source data structure remaining the same as the one shown by you in scrn shot. Now this target data structure will be similar to the source, except that you need to add one more field at the end(name different from other fields) in target (whose occurrence should be 0..unbounded), and it needs to be mapped to E1EDP01 provided the tax code field MSKWZ(its context changed to E1EDP01) equalsS to constant '03'.
    In the second message mapping you need to map the target structure of previous message mapping to the actual required structure. The newly added field should be mapped to ADP_File of your final target structure.
    This will then create the same structure as required.
    Note : Please change the occurence of ADP_File to 0..unbounded.
    Regards,
    Souvik

  • Sum based on Number values in a Char string..

    i have a requirement
    i have a field on my form, designed in form6i (oracle 10g)
    my tables are;
    with t1 as (
                select 101 t1_code,'it101' t1_itcode, 10 t1_qty, 5.5 t1_prc from dual union all
                select 101,'it102',  5 , 3 from dual union all
                select 102,'it102', 10 , 3 from dual union all
                select 102,'it104', 10 , 5 from dual union all
                select 103,'it101', 10 , 5.5 from dual)
    select * from t1;
    with t2h as (
                select 11 t2h_no, 101 t2h_code from dual union all
                select 12 , 101  from dual union all
                select 13 , 102  from dual union all
                select 14 , 103  from dual )
    select * from t2h;
    with t2d as (
                select 11 t2d_no, 'it101' t2d_itcode, 5 t2d_qty from dual union all
                select 11 , 'it102', 5 from dual union all
                select 12 , 'it101', 5 from dual union all
                select 13 , 'it102', 5 from dual union all
                select 13 , 'it104', 5 from dual union all
                select 13 , 'it102', 5 from dual union all
                select 13 , 'it104', 5 from dual union all
                select 14 , 'it101', 10 from dual)
    select * from t2d;t1_CODE , t2h_no and t2d_no are fields Number datatype.
    var m_x varchar2(20);
    exec :m_x :='11,12';
    lets say the value of m_x (t2d_no) is 11,12
    i want the query to sum t2d_qty for t2d_no 11 & 12 and put 1 t1_prc in the resultant row
    based on the matching t1_itcode with t2d_itcode
    the result should be like this for m_x = 11,12
    T1_IT        T1_QTY        T1_PRC
    it101        15.000         5.500
    it102         5.000         3.000
    if m_x hold just 11 then it should return just;
    T1_IT        T1_QTY        T1_PRC
    it101         5.000         5.500
    it102         5.000         3.000if m_x hold just 11,13 then it should return an error msg
    as the t2h_code is not the same for t2d_no 11 & 13;
    kindly suggest..
    TY

    I tried to solve the puzzle. But I'm already confused on the requirement. On what fields do you want to join and what fields to sum....??
    I did this, but then I got lost.... maybe you can use it as a start to define "join" and "sum" ... conditions.
    with t1 as (
                select 101 t1_code,'it101' t1_itcode, 10 t1_qty, 5.5 t1_prc from dual union all
                select 101,'it102',  5 , 3 from dual union all
                select 102,'it102', 10 , 3 from dual union all
                select 102,'it104', 10 , 5 from dual union all
                select 103,'it101', 10 , 5.5 from dual),
    t2h as (
                select 11 t2h_no, 101 t2h_code from dual union all
                select 12 , 101  from dual union all
                select 13 , 102  from dual union all
                select 14 , 103  from dual ),
    t2d as (
                select 11 t2d_no, 'it101' t2d_itcode, 5 t2d_qty from dual union all
                select 11 , 'it102', 5 from dual union all
                select 12 , 'it101', 5 from dual union all
                select 13 , 'it102', 5 from dual union all
                select 13 , 'it104', 5 from dual union all
                select 13 , 'it102', 5 from dual union all
                select 13 , 'it104', 5 from dual union all
                select 14 , 'it101', 10 from dual)
    select t1.t1_itcode,sum(a.t2d_qty)t2d_qty ,sum(t1.t1_prc)t1_prc
    FROM
    (select t2d.t2d_no,sum(t2d.t2d_qty) t2d_qty
    from t2d
    inner join t2h
    on (t2d.t2d_no=t2h.t2h_no)
    where t2d.t2d_no in (11,12)
    group by t2d.t2d_no
    ) a
    inner join t1
    on (t1.t1_qty = a.t2d_qty )
    group by t1.t1_itcode, t1.t1_prc;

  • ALV rows coloring based on condition

    Hai ,
    I want Color the rows in the list based on some condition ..
    Hope to get the helpful suggestion s on this asap
    regards,

    Hi shishupalreddy,
    1. Not only the full row color,
      we can also manipulate the color in each cell,
      based upon conditions.
    2.
    IMPORTANT THINGS
    a. Extra field in internal table
    clr TYPE slis_t_specialcol_alv,
    (this field will contain the colour codes)
    b. assign fieldname to alv layout
    alvly-coltab_fieldname = 'CLR'
    c. work area for colour
    DATA : clrwa TYPE slis_specialcol_alv.
    d. Populating the color
    Once again
    Loop at ITAB.
    *********logic
    if itab-field < 0 "---negative
    clrwa-fieldname = 'FIELDNAME'. "<--- FIELDNAME FOR COLOR
    clrwa-color-col = 6. <------- COLOUR 0-9
    APPEND clrwa TO itab-clr.
    MODIFY ITAB.
    endif.
    ENDLOOP.
    5. just copy paste in new program
    6.
    REPORT abc .
    NECESSARY / MUST
    TYPE-POOLS : slis.
    DATA : alvfc TYPE slis_t_fieldcat_alv.
    DATA : alvly TYPE slis_layout_alv.
    ITAB DECLARATION
    DATA : prg TYPE sy-repid.
    DATA : BEGIN OF itab OCCURS 0.
    INCLUDE STRUCTURE t001.
    DATA : clname(3) TYPE c,
    clr TYPE slis_t_specialcol_alv,
    END OF itab.
    DATA : clrwa TYPE slis_specialcol_alv.
    PARAMETERS : a TYPE c.
    DATA : flname TYPE slis_fieldname.
    SELECT
    START-OF-SELECTION.
    SELECT * FROM t001
    INTO CORRESPONDING FIELDS OF TABLE itab..
    LOOP AT itab..
    IF SY-TABIX <= 5.
    itab-clname = 'C50'.
    ELSE.
    itab-clname = 'C30'.
    ENDIF.
    MODIFY itab.
    ENDLOOP.
    LOOP AT ITAB.
    check itab-bukrs = '1000'
    clrwa-fieldname = 'BUTXT'.
    clrwa-color-col = 6.
    APPEND clrwa TO itab-clr.
    MODIFY ITAB.
    clrwa-fieldname = 'LAND1'.
    clrwa-color-col = 4.
    APPEND clrwa TO itab-clr.
    MODIFY ITAB.
    ENDLOOP.
    prg = sy-repid.
    flname = 'CLNAME'.
    alvly-info_fieldname = 'CLNAME'.
    alvly-coltab_fieldname = 'CLR'.
    LOOP AT ITAB.
    if sy-tabix = 3.
    clrwa-fieldname = 'BUTXT'.
    clrwa-color-col = 6.
    APPEND clrwa TO itab-clr.
    MODIFY ITAB.
    clrwa-fieldname = 'LAND1'.
    clrwa-color-col = 1.
    APPEND clrwa TO itab-clr.
    MODIFY ITAB.
    endif.
    ENDLOOP
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    i_program_name = prg
    i_internal_tabname = 'ITAB'
    i_inclname = prg
    CHANGING
    ct_fieldcat = alvfc
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2
    OTHERS = 3.
    minimum
    *CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    it_fieldcat = alvfc
    TABLES
    t_outtab = itab
    EXCEPTIONS
    program_error = 1
    OTHERS = 2
    extra
    sy-uname = 'XYZAB'.
    prg = sy-repid.
    Excluding
    DATA : excl TYPE slis_t_extab.
    DATA : exclwa TYPE slis_extab.
    exclwa = '&OUP'.
    APPEND exclwa TO excl.
    exclwa = '&ODN'.
    APPEND exclwa TO excl.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    it_fieldcat = alvfc
    i_callback_program = sy-repid
    is_layout = alvly
    i_callback_user_command = 'ITAB_USER_COMMAND'
    it_excluding =
    excl
    i_save = 'A'
    TABLES
    t_outtab = itab
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    *& Form itab_user_command
    text
    -->WHATCOMM text
    -->WHATROW text
    FORM itab_user_command USING whatcomm TYPE sy-ucomm whatrow TYPE
    slis_selfield.
    BREAK-POINT.
    ENDFORM. "itab_user_command
    regards,
    amit m.

  • How to blink TreeView Nodes based on condition c#

    suppose i am populating my tree view with data from database and i want to blink those nodes which has a specific data. now guide me with code how can i efficiently blink multiple tree view nodes  based on condition in winform application.

    Hi Mou_kolkata,
    >> anyone can give me small working code for tree node blinking
    Thank Armin for the details about blinking TreeView Nodes.
    For a simple demo to blink TreeView nodes, you could refer the link below:
    # Treeview control - How to make a node blink?
    https://social.msdn.microsoft.com/Forums/en-US/64e7a4d7-3098-4370-990f-390cb3a640a1/treeview-control-how-to-make-a-node-blink
    If you have issues when you blink Treeview nodes, please feel free to post a new thread in this forum, then you would get more help.
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to give color to the display of keyfigure based on condition using exception.

    Dear Friends.
       I am trying to color "BAD3" in exception based on condition but my problem is in exception I can have only formula variable to compare the value, How to assign a value to formula variable in BEx Query designer.
    What I am trying to do is :
       in Query designer :
       I have PO Quantity and Delivered Quantity. 
      if PO Qnantity > Delivered Quantity
        then Delivered Quantity field should be colored as "BAD3" in exception.
    but here proble is in exception
      I have alert level , operator, and  value fields for Delivered Quantity keyfigure ( Under definition tab - Exception is defined on = Delivered Quantity ).
    but for value field I dont have PO Quantity for that I have to supply one formula variable,
    When I created a forumula  and did this way
    FV_PO_QUANTITY = PO_QUANTITY formula editor throws errors. I dont understand How to assign a value of key figure to formula variable and use it in EXceptions.
    Please help me How I can solve my problem
    I will greatly appreciate your any help.
    Thanking you
    Regards
    Naim

    Thank you so much for your replies,
      I did following way and it helped me to solve my issues.
      I created one formula and under formula I use boolean < funtion to compare the values.
    like following way.
    ( 'PO Quantity' > 'Delivered Quantity' ) * ( FV_PO_QNT + PO_QUANTITY')
    here fv_po_qnt is formula variable I supply that variable to exception and since I have the value in it.. it compares with Delievered Quantity value and colored the perticular cell.
    Thanks again for your replies
    Regards
    Naim

  • How to stop workitem complete or how to keep work item in inbox based on conditions even if it completed

    Hi,
    my requirement is to call webdyn pro screen from workflow..
    i am calling webdynpro screen by using FM :CALL_BROWSER from workflow.
    when webdyn pro screen is called user will enter some values . if user closed webdyn pro screen with out entering any values we need show this workitem in his inbox. so that user can again open it and enter values in the webdyn pro screen.
    Please help how to stop work item complete based on conditions.
    Thanks,
    phani

    Hi,
    As per my understanding, this is not a proper approach toy call web dynpro using FM CALL_BROWSER. is the web dynpro screen being called when user clicks on the work item from portal UWL OR from SAP SBWP ?
    if you are calling web dynpro screen from portal UWL when user clicks on work item link, better you achieve it using SWFVISU tcode. in SWFVISU tcode you can maintain which web dynpro. application to call when particualr work item task come in user's inbox. in your web dynpro code, then you can write your buisiness logic when user clicks for example SUBMIT/SAVE button. on action submit/save button you can use FM SAP_WAPI_WORKITEM_COMPLETE to complete the worktiem once the user clicks on final submit/save button. in this way the workitem will get removed from user inbox only upon clicking on submit/save button.
    You can refer below link for web dynpro for workitem:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70648e99-4cc1-2c10-879d-9c61003c69d6?QuickLink=index&…

  • Table Control - Input Enabling/Diabling of Rows based on Condition.

    Hi,
    In the TC, I want to Input Enable/Disable the rows based on Conditions. The First row is input enabled always. But the other rows, (2nd onwards) need to be Input Enabled/Disabled based on some conditions. It is possible to make this working. Can you please provide me a suitable solution for this?
    Appreciate Your Help.
    Thanks,
    Kannan

    Hi Kannan...
    If we are talking about "Rows"...
    then identify based on some conditions the row numbers and in PBO...loop at screen with screen name..set thier input properties and modify screen (make them input only)
    If we are taking into consideration "columns"
    There is an internal structure COLS where we can identify column number of screen name ...or we can take except for one particular column..
    if some condition satisfied....
    loop at screen where screen-name <> "Column which is input'.
    Loop at screen...and make other columns display only.
    modify screen
    endif.
    Regards
    Byju

  • Need to send notification to a specific person based on condition

    Please help.
    I need to send notification to a specific person based on condition. When a specific hold is placed on an invoice, send a notification to the Buyer who is referenced on the Purchase Order that is associated with that invoice. It will be an FYI notification.
    I'm looking at APINVHDN AP Hold Maiin Process. I thought possibly adding a notification into the "No" condition after the GET_APPROVER function since there would not be an approver on the invoice since it's on hold.
    Any ideas would be very much appreciated.

    Try the LiveCycle Designer forum.

  • CFM /TR - how system calculate amount based on rate FX 60A

    Hi all,
    i need to know how system calculates amount based on rate entered upon creating a contract (t-code TX01).
    steps input:-
    1. header - comp code, product type, trans type
    2. partner
    3. purchase curr & amount (eg. IDR 8,345,545,500)
    4. sale currency only (amount system will auto calculate) USD
    5. rate field = 11.553
    6. spot rate will auto pick up from rate
    7. value date
    8. contract date
    upon TBB1 no error. posting log as follows:-
    FX1000+ : 40 8,345,545,500 IDR bank GL acc
                    50 8,345,545,500 IDR clearing acc
    FX2000- : 40 722370.42 USD clearing acc
                   50 722370.42 USD bank GL acc
    but upon TPM18 error occurred as follows:
    DBT_C009 - GL not maintain in acc symbol 5.3.4
    DBT_E039 - no posting spec assigned to update type
    DBT_B018 : 40 0 USD, 431,977,511 IDR gain/loss
                       50 0 USD, 431,977,511 IDR clearing acc
    so, after maintained DBT_C009 as follows still error for DBT_E039:
    40  0 USD, 38 IDR clearing acc
    50  0 USD, 38 IDR P&L gl acc
    what i don't understand is how system calculate and get DBT_C009 & DBTE039.
    what is the function of TPM18?
    thanks.

    Hello Prarnod,
    I have done the first node only for actuals that come from the integration to the internal order.
    I have tried setting up 2 and 3 even though the 3rd one does not make any sense to me
    Thanks,
    Paul

  • Calling different pages in a single sap script based on conditions?

    Hi All,
             Can anyone please give me an example of how to call different pages in a single sap script based on condition. Eg., i need to call 5 differnet pages from a single sap script based on 5 company codes.
    Please help
    Regards
    Priya

    This approach to make call from SAPscript. Its concept is similar to make call to a subroutine in another program. I would presume you understand how to use USING and CHANGING parameter. =)
    SAPscript -
    /: Perform get_date in program z_at_date
    /:    using &p_year&
    /:    changing &new_date&
    /: endperform.
    program z_at_date -
    form get_date TABLES rec_in  STRUCTURE itcsy
                                    rec_out STRUCTURE itcsy..
    DATA:
       v_year type char10.
    sap script and subroutine uses itcsy structure to transmit parameters
    first parameter is incoming while second parameter is out going
    their function is like an internal table with header line
    all data types between SAPscript and subroutine are string.
    so, you might need additional conversion.
    read incoming parameter with exact name from SAPscript
      READ TABLE rec_in WITH KEY name = 'P_YEAR'.
      IF sy-subrc EQ 0.
        v_year = rec_in-value.
      ENDIF.
    to return value, use the exact name on the second structure
        CONCATENATE v_year v_year INTO v_year.
        READ TABLE rec_out WITH KEY name = 'NEW_DATE'.
        IF sy-subrc EQ 0.
          rec_out-value = v_year.
          MODIFY rec_out TRANSPORTING value WHERE name = 'NEW_DATE'.
        ENDIF.
    endform.
    Hope this helps =)

  • Suppress Target structure based on condition

    Hi
    How to suppress target structure based on condition
    Example:
    Source is like:
    <Details>
    <Name>abdc</Name>
    <ID>234</ID>
    <Address>US</Address>
    </Details>
    I have two target structures
    1:
    <Details>
    <Name>abdc</Name>
    <ID>234</ID>
    <Address>US</Address>
    </Details>
    2:
    <Error>
        <ErrorID>
    </Error>
    if Any of the source filed is null then i dont want to map it to source structure. instead I want to assign an error id to ErrrorID node of the target.
    example
    abc,123,US
    abc
    in above case second record has two null values
    so my target structure should be
    <Details>
    <Name>abc</Name>
    <ID>123</ID>
    <Address>US</Address>
    </Details>
    <Error>
        <ErrorID>2nd record has erro</ErrorID>
    </Error>
    How to acheive this..
    Please help us
    Regards
    Sowmya

    hi ,
    plz try the following mapping
    Name-->exist-->if than else-> tuue----->Name
                                                        false---(constant)--
    error
    ID-->exist-->if than else-> tuue----->ID
                                                     false---(constant)--
    error
    adress-->exist-->if than else-> tuue----->address
                                                          false---(constant)--
    error
    regards,
    navneet

Maybe you are looking for

  • Web Dynpro Field Elements Disabled

    Hello:    The text fields of my Web Dynpro App are disabled when I run the app. Im trying to change the Collection Cardinality in the context to 1...1 but I cant, it seems to be disable too.    Can anyone help me? How can I change the cardinality? Be

  • How long does my private chat/message convertation...

    How long does my private chat/message convertation last in skype? I can't find back one convertation from januar-feb 2015 and some from 2014. Do skype delete my message if i don't write for a while? This post was transferred from its previous locatio

  • MMS pictures disappeared in my messages. Idk how to get them back :/

    I just happened to scroll up to my old messages with a friend to find some pictures they sent me, but all i see is a whoel bunch of arrows with a huge blank spot.  Then wen i press on the arrow, an all black screen pops up. -CAN ANYBODY HELP ME??? Th

  • Will a new Ipod bought in USA work in UK? Thanks

    Hi if I buy one of the latest Ipod touchs from USA will it work OK in UK. Thank you

  • 2nd Apple Tv constantly disconnects

    Well, the title says it all. My first apple tv worked well except for renting content from iTunes. (362 minute downloads) The rest, netflix, sharing etc all worked. So i bought my second for the bedroom and it constantly needs to be reset. After each