Help needed on ABAP coding - put restricted kf as abap coding in update rle

All,
I have to change resticted keyfigures from query level into the update rules but don't know the correct abap coding.
The field trade sales <b>(0G_AVVTRS</b>) must be limited by Type of Sales (<b>0G_CWWTSN</b>) range (# ; 350) and (600 ; 999).
In other words: keyfigure <b>0G_AVVTRS</b> may only show it's value when characteristic <b>0G_CWWTSN</b> value is between the ranges (# ; 350) or (600 ; 999). Wen the value is outside this range the it must be empty.
Please advise how to handle this with abap code (release 3.1).
Many thanks,
Tom

In the update rules for mapping 0G_AVVTRS try this :
[code]$$ begin of routine - insert your code only below this line        -
fill the internal table "MONITOR", to make monitor entries
result value of the routine
  if COMM_STRUCTURE-(Type of Sales) le '350' or
    (COMM_STRUCTURE-(Type of Sales) ge '600'
     and COMM_STRUCTURE-(Type of Sales) le '999').
    RESULT = COMM_STRUCTURE-(Field Trade Sales).
  else.
    RESULT = 0.
  endif.
if abort is not equal zero, the update process will be canceled
  ABORT = 0.
$$ end of routine - insert your code only before this line         -[/code]
Hope this helps.

Similar Messages

  • HELP NEEDED!! Recently upgraded my ipad air to the new update, charged it over night, now it will not come on? i plug in the charger but comes up the normal charging sign but still no life in it?

    HELP NEEDED!! Recently upgraded my ipad air to the new update, charged it over night, now it will not come on? i plug in the charger but comes up the normal charging sign but still no life in it? Seems as though theres either a problem it charging or starting up. Had the ipad for about a year and a month or 2.. what can i do to source the problem?

    Its just started up with the apple sign, then it goes to an off black coloured screen so its on but nothing showing just a dark screen but not jet black.. ahhh help!! thank you in advance

  • Help Needed in ABAP Webservice

    Hi Friends
    We have created a webservice in ABAP,but we can't able to access it from outside network.
    I want to access my webservice page like"google", what I need to do..we can't open the port as a public.. because confidentitial data is there..initailly SAP provides UDDI registry or something to achieve this functionality.. I am not able to access the site now... anybody have idea about how to access my webservice through public network..let me expalin.. it will helpful to me ..
    Thanks in Advance..
    Regards
    Gowrishankar

    Maximum question reached, so closing this.

  • Help needed on abap heap area parameters

    Hi Gurus ,
    I need your help in regards with abap heap area parameters , we are facing a lot of system no roll memory issues on one of our instance.
    As for my understanding :
    1)abap/heap_area_dialog : heap memory limit for dialog process.
    2).abap/heap_area_nondialog: heap memory limit for non-dialog process.
    3).abap/heap_area_total : what this implies ?
    In my production instance the parameters are as follows :
                                                    Actuals
    abap/heap_area_dialog -
        2GB    (Recommended : 2GB for an application server with max 50 users )
    abap/heap_area_nondialog:-- 2GB  (Recommended : 2GB or an application server with max 50 users )
    abap/heap_area_total ---        1GB        (Recommended and default value: 2GB)
    My doubt is  "abap/heap_area_total  of 1GB "  might creating problems .
    What is the recommended value for abap/heap_area_total on Solaris 10 ?
    your valuable inputs required :!

    Hello Sandy
    Have a look at this link for UNIX
    http://help.sap.com/saphelp_nw04/helpdata/en/02/96257b538111d1891b0000e8322f96/content.htm
    For more in memory management in below link
    http://help.sap.com/saphelp_nw04/helpdata/en/02/96253c538111d1891b0000e8322f96/frameset.htm
    Regards
    Vivek

  • Help needed - Advanced Chart Coding

    Hi all,
    I am currently developing some charts that have to be coded as wizard is not enough for this. Any idea where to find some advanced chart coding for using random colors for bars and adding values on top of bars, etc.
    This is my current code that I need to extend:
    chart:
    <Graph depthAngle="50" depthRadius="8" pieDepth="30" pieTilt="20" seriesEffect="SE_AUTO_GRADIENT" graphType="BAR_VERT_CLUST">
    <LegendArea visible="true" />
    <LocalGridData colCount="3" rowCount="1"><RowLabels>
    <MarkerText visible="true" markerTextPlace="MTP_CENTER"/>
    <Label>Number of Hours</Label>
    </RowLabels>
    <ColLabels>
    <xsl:for-each select="current-group()" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:if test="../@name='Hours_Demand_Daily'or ../@name='Hours_Scheduled_Daily' or ../@name='Hours_Budget_Daily'">
    <Label>
    <xsl:value-of select="translate(../@name,'_',' ')"/>
    </Label>
    </xsl:if>
    </xsl:for-each>
    </ColLabels>
    <DataValues>
    <RowData>
    <xsl:for-each select="current-group()" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:if test="../@name='Hours_Demand_Daily'or ../@name='Hours_Scheduled_Daily' or ../@name='Hours_Budget_Daily'">
    <Cell>
    <xsl:value-of select="ows:Quantity"/>
    </Cell>
    </xsl:if>
    </xsl:for-each>
    </RowData>
    </DataValues>
    </LocalGridData>
    </Graph>

    To add color<SeriesItems>
    <Series id="0" color="#ffcc00"/>
    <Series id="1" color="#ff6600"/>
    </SeriesItems>Add the series as how many needed in it.
    refer Re: Need help to create BAR chart with two sets of data
    To add, the value on top of the bar
    <MarkerText visible="true">
    <Y1ViewFormat>
    <ViewFormat numberType="NUMTYPE_GENERAL" numberTypeUsed="true"  />
    </Y1ViewFormat>
    </MarkerText>

  • Urgent Help need for ABAP Custom Process Types

    Hi Gurus,
    I have created a Custom Process Type for ABAP program which returns status (Success or Failure).
    I followed the below procedure to create a custom ABAP process type.
    In RSPC, I went to Settings -> Maintain process types
    I selected the ABAP process type and then selected the EDIT -> COPY AS and then in the process chain configuration screen, I gave a new name to the process type, changed the POSSIBLE EVENTS settings to "2 process ends "successful" or "failure" and saved the settings to confirm changes.
    Now I can see the new process type for ABAP program which returns the success or failure for the successors.
    Now, my question is, where do i write the logic for ABAP program ? how does the ABAP program returns the success or failure. Do I have to change the code in the method IF_RSPC_EXECUTE~EXECUTE to return success or failure.  Please make me clear where I can write the code? For example in my ABAP program, I am searching a table to find a specific value. If the value is not found, then the ABAP process type should return failure, if found should return success. How can I do this?
    Thanks in advance,
    Regards,
    aarthi
    [email protected]

    Hi,
       We have a similar problem. We have an ABAP program in a process chain that
    uses a custom process type with on success and on failure.
        If  the program is successful there is no problem. it will run the next process step.
        The problem is when the ABAP Program fails and even though the message class is E in our ABAP program it has a confirm popup message with a status change and asks "Save Status and Trigger Events if Appropriate".
         Once you enter Yes to continue it then continues to the next step in the program and is fine.I traced in debug where this status message is appearing. It is in CL_RSPC_LOG. There is a popup_to_confirm_step where it checks the e_status that is value J ( Framework Error upon completion). Then it submits the rspc_process_finish program to complete and call the on error process step.
         Has anyone else experienced this and is there any other documents out there to help me?
    Apologies if this is not very clear.
    Any assistance would be appreciated.
    Thanks
    Monica Mandia

  • Help Needed - Pages will not put/upload

    I will greatly appreciate your advice! - Just had my computer
    wiped clean and Windows XP reinstalled. I then reinstalled
    Dreamweaver MX 2004 with no problems. However, one of the sites I
    had created for a client is causing a problem. (The rest are all
    working fine.) When I make changes to a page, then put or upload
    it, nothing happens to the pages on the website. It remains the
    same. I suspect something is wrong with the way I set up the Site
    Definition but I cannot find the problem anywhere. I am also
    getting the message " An FTP error occurred - cannot make
    connection to host. The remote host cannot be found." I've entered
    the site as both an IP address and as the FTP server and neither
    makes any difference. Have been going over it for 2 days now and am
    lost. By the way, the only difference between this website and the
    other 4 I manage is that this one uses a different web host.
    I do hope someone can suggest a solution! Thank you!

    Yes, Elaine - and thank you!
    The test button indicated that everything was okay.
    I finally solved the problem this morning and except for one
    new problem, everything is working well. I maintain 5 sites, 4 with
    one web host and the "problem" site with a different host. Figured
    that had to mean something so I fiddled with all of the Site
    Definitions until I got it working. Whereas the other 4 work with
    every single area filled out, this one works with several of them
    omitted. I have no idea why this works, but it does.
    The remaining problem I have - and it's another new one to me
    - is that every time I put/upload, I get a window that states that
    someone else is working on a page and requesting that I enable
    check in/out. I'm the only one working on the site so that is
    strange. It is ony a nuisance though because I can choose to upload
    the file anyway.
    I appreciate your taking the time to help!
    Thank you!
    Maria

  • Help needed in Abap

    Hi all;
    I am trying to delete the request from cube except the last load of the month(we have daily load now so assume that last day of the month) of the fiscal period. I am writing the following code in the delete routine, but can't figure out how to avoid the lastday of the month in fiscal period.
    Could anyone help me!
    TABLES: RSMONICDP.
    DATA:  request LIKE RSMONICDP-RNR,
    ts LIKE RSMONICDP-TIMESTAMP.
    loop at l_t_request_to_delete.
            SELECT DISTINCT RNR INTO request FROM RSMONICDP
                   WHERE ICUBE = 'Zdis_c01'.
                   SELECT TIMESTAMP INTO ts FROM RSMONICDP
                   WHERE RNR = request.
                   ENDSELECT.
        (how do I avoid the last day of the month here ?)
            CALL FUNCTION 'RSSM_DELETE_REQUEST'
            EXPORTING REQUEST = request
            INFOCUBE = 'Zdis_c01'.
            ENDSELECT.
      endloop.
         clear p_subrc.
    Thank you.
    Krishma.

    Hi Krishma,
    Table RSMONICDP has field TIMESTAMP. I think you can use this time stamp, convert it into a date, and from there you can use an IF statement to avoid executing the CALL FUNCTION MODULE unless day of obtained date is not month's last day (I would use a CASE statement by month for example). Here you are how the routine would look like:
    STATICS: l_time TYPE sy-uzeit,
             l_date TYPE sy-datum,
             l_month(2) TYPE N,
             l_day(2) TYPE N.
    loop at l_t_request_to_delete.
      SELECT DISTINCT .....
      CONVERT TIME STAMP RSMONICDP-TIMESTAMP
           TIME ZONE 'UTC+12'  "your time zone
              INTO DATE l_date
                   TIME l_time.
      L_MONTH = L_DATE+4(2).
      L_DAY = L_DATE+6(2).
      clear l_delete.
      CASE l_month.
      WHEN 1.
        IF l_day < 31. l_delete = 1. ENDIF.   
      WHEN 2.
    implement something for leap year here
        IF l_day < 29. l_delete = 1. ENDIF.
      WHEN 12.
        IF l_day < 31. l_delete = 1. ENDIF.   
      ENDCASE.
      IF l_delete = 1.
         CALL FUNCTION ....
      ENDIF.
    ENDLOOP.
    Hope it helps!
    Mario.

  • Check code ( urgent help needed from ABAP guys working on FI/CO)

    hi all,
    check my code & give me solution for getting only offsetting acounts depending on particular HKONT.
    plz i need its solution urgently.
    REPORT zglaccline NO STANDARD PAGE HEADING                              
                       LINE-SIZE 300                                         
                       LINE-COUNT 65(3).                                                                               
    TABLES : bkpf, bseg.                                                                               
    DATA : BEGIN OF it_bkpf OCCURS 0,                                       
            bukrs LIKE bkpf-bukrs,                                           
            belnr LIKE bkpf-belnr,                                           
            gjahr LIKE bkpf-gjahr,                                           
            monat LIKE bkpf-monat,                                           
            budat LIKE bkpf-budat,                                           
            brnch LIKE bkpf-brnch,                                           
            xblnr LIKE bkpf-xblnr,                                           
            waers LIKE bkpf-waers,                                           
            END OF it_bkpf.                                                                               
    DATA : BEGIN OF it_bseg OCCURS 0,                                        
    gsber LIKE bseg-gsber,                                                   
    hkont LIKE bseg-hkont,                                                   
    kunnr LIKE bseg-kunnr,                                                   
    sgtxt LIKE bseg-sgtxt,                                                   
    bschl LIKE bseg-bschl,                                                   
    wrbtr LIKE bseg-wrbtr,                                                   
    dmbtr LIKE bseg-dmbtr,                                                   
    pswsl LIKE bseg-pswsl,                                                   
    kostl LIKE bseg-kostl,                                                   
    prctr LIKE bseg-prctr,                                                   
    aufnr LIKE bseg-aufnr,                                                   
    shkzg LIKE bseg-shkzg,                                                   
    augbl LIKE bseg-augbl,                                                   
    END OF it_bseg.                                                                               
    DATA : BEGIN OF it_res OCCURS 0,                                           
    bukrs LIKE bkpf-bukrs,                                                    
    gjahr LIKE bkpf-gjahr,                                                    
    monat LIKE bkpf-monat,                                                    
    belnr LIKE bkpf-belnr,                                                    
    budat LIKE bkpf-budat,                                                    
    brnch LIKE bkpf-brnch,                                                    
    gsber LIKE bseg-gsber,                                                    
    hkont LIKE bseg-hkont,                                                    
    kunnr LIKE bseg-kunnr,                                                    
    bschl LIKE bseg-bschl,                                                    
    prctr LIKE bseg-prctr,                                                    
    kostl LIKE bseg-kostl,                                                    
    aufnr LIKE bseg-aufnr,                                                    
    pswsl LIKE bseg-pswsl,                                                    
    wrbtr LIKE bseg-wrbtr,                                                                               
    waers LIKE bkpf-waers,                                                 
    dmbtr LIKE bseg-dmbtr,                                                 
    xblnr LIKE bkpf-xblnr,                                                 
    txt50 LIKE skat-txt50,                                                 
    sgtxt LIKE bseg-sgtxt,                                                 
    shkzg LIKE bseg-shkzg,                                                 
    END OF it_res.                                                                               
    DATA : BEGIN OF itab_head OCCURS 0,                                     
           name1(20) TYPE c,                                                
           END OF itab_head.                                                
    SELECTION-SCREEN BEGIN OF BLOCK b_2 WITH FRAME TITLE text-002.          
    PARAMETERS : p_sel1 RADIOBUTTON GROUP sel,                              
                 p_sel2 RADIOBUTTON GROUP sel,                              
                 p_sel3 RADIOBUTTON GROUP sel.                              
    SELECTION-SCREEN END OF BLOCK b_2.                                      
    SELECTION-SCREEN SKIP 1.                                                
    SELECTION-SCREEN BEGIN OF BLOCK b_1 WITH FRAME TITLE text-001.          
    PARAMETER p_bukrs LIKE bkpf-bukrs DEFAULT 'ML' OBLIGATORY.              
    SELECT-OPTIONS : s_belnr FOR bkpf-belnr.                                
    SELECT-OPTIONS : s_gjahr FOR bkpf-gjahr OBLIGATORY.                     
    SELECT-OPTIONS : s_monat FOR bkpf-monat.                                
    SELECT-OPTIONS : s_blart FOR bkpf-blart.                                
    SELECT-OPTIONS : s_budat FOR bkpf-budat.                                
    SELECT-OPTIONS : s_waers FOR bkpf-waers.                                
    SELECT-OPTIONS : s_hkont FOR bseg-hkont.                                
    SELECT-OPTIONS : s_bldat FOR bkpf-bldat.                                
    SELECTION-SCREEN END OF BLOCK b_1.                                                                               
    SELECT bukrs belnr gjahr monat budat brnch xblnr waers                  
       INTO CORRESPONDING FIELDS OF TABLE it_bkpf                           
       FROM bkpf                                                            
       WHERE bukrs = p_bukrs                                                
       AND belnr IN s_belnr                                                 
       AND gjahr IN s_gjahr                                                 
       AND monat IN s_monat                                                 
       AND blart IN s_blart                                                 
       AND budat IN s_budat                                                 
       AND bldat IN s_bldat                                                 
       AND waers IN s_waers.                                                                               
    IF NOT it_bkpf[] IS INITIAL.                                            
      LOOP AT it_bkpf.                                                      
    IF p_sel1 = 'X'.                                                        
        SELECT gsber hkont kunnr sgtxt bschl wrbtr pswsl kostl shkzg        
                            dmbtr prctr aufnr augdt augbl                               
           INTO CORRESPONDING FIELDS OF TABLE it_bseg                       
           FROM bseg                                                        
           WHERE bukrs = it_bkpf-bukrs                                      
           AND belnr   = it_bkpf-belnr                                      
           AND gjahr   = it_bkpf-gjahr                                      
           AND pswsl   = it_bkpf-waers                                      
           AND hkont  IN s_hkont.                                           
    ELSEIF p_sel2 = 'X'.                                                    
        SELECT gsber hkont kunnr sgtxt bschl wrbtr pswsl kostl shkzg        
                dmbtr prctr aufnr augdt augbl                               
           INTO CORRESPONDING FIELDS OF TABLE it_bseg                       
           FROM bseg                                                        
           WHERE bukrs = it_bkpf-bukrs                                      
           AND belnr   = it_bkpf-belnr                                      
           AND gjahr   = it_bkpf-gjahr                                      
           AND pswsl   = it_bkpf-waers.                                    
          AND koart <> 'S'.                                              
    ENDIF.                                                                 
        IF sy-subrc EQ 0.                                                  
          LOOP AT it_bseg.                                                 
            SELECT SINGLE txt50 INTO it_res-txt50                          
                 FROM skat                                                 
                 WHERE spras = 'EN'                                        
                 AND   ktopl = 'PCA'                                       
                 AND   saknr = it_bseg-hkont.                                                                               
    it_res-bukrs = it_bkpf-bukrs.                                  
            it_res-gjahr = it_bkpf-gjahr.                                  
            it_res-monat = it_bkpf-monat.                                  
            it_res-gsber = it_bseg-gsber.                                  
            it_res-belnr = it_bkpf-belnr.                                  
            it_res-budat = it_bkpf-budat.                                  
            it_res-brnch = it_bkpf-brnch.                                  
            it_res-kunnr = it_bseg-kunnr.                                  
            it_res-hkont = it_bseg-hkont.                                  
            it_res-sgtxt = it_bseg-sgtxt.                                  
            it_res-bschl = it_bseg-bschl.                                  
            it_res-wrbtr = it_bseg-wrbtr.                                  
            it_res-pswsl = it_bseg-pswsl.                                  
            it_res-waers = it_bkpf-waers.                                  
            it_res-dmbtr = it_bseg-dmbtr.                                  
            it_res-kostl = it_bseg-kostl.                                  
            it_res-prctr = it_bseg-prctr.                                  
            it_res-aufnr = it_bseg-aufnr.                                  
            it_res-shkzg = it_bseg-shkzg.                                  
           it_res-augbl = it_bseg-augbl.                                 
            it_res-xblnr = it_bkpf-xblnr.                                  
            APPEND it_res.                                                 
            CLEAR it_res.                                                  
          ENDLOOP.                                                         
          CLEAR it_bkpf.                                                   
        ENDIF.                                                             
      ENDLOOP.                                                             
    ENDIF.                                                                 
    LOOP AT it_res.                                                        
      IF it_res-shkzg EQ 'H'.                                              
        it_res-wrbtr = it_res-wrbtr * -1.                                  
        it_res-dmbtr = it_res-dmbtr * -1.                                  
      ENDIF.                                                               
      WRITE : /2(4) it_res-bukrs,                                          
               13(4) it_res-gjahr,                                         
               21(2) it_res-monat,                                         
               31(10) it_res-belnr,                                        
               44(10) it_res-budat,                                        
               55(4) it_res-brnch,                                         
               60(4) it_res-gsber,                                          
               70(10) it_res-hkont,                                         
               82(10) it_res-kunnr,                                         
               94(2) it_res-bschl,                                          
               104(10) it_res-prctr,                                        
              116(10)  it_res-kostl,                                        
              128(12)  it_res-aufnr,                                        
              142(5)  it_res-pswsl,                                         
              148(13)  it_res-wrbtr,                                        
              164(5)  it_res-waers,                                         
              170(13)  it_res-dmbtr,                                        
             187(16)   it_res-xblnr,                                        
              205(50)  it_res-sgtxt.                                        
      MODIFY it_res.                                                        
      CLEAR it_res.                                                         
    ENDLOOP.                                                                
    plz give soltuion i am looking for it.
    i will aslo reward all ur precious effort.
    otherwise if anyone have any code on my reqirement then plz send it to me in my id- [email protected]
    thanks
    Message was edited by: sanjeev singh

    Hi
    You should a selection in BSIS and BSAS table instead of BKPF and BSEG:
    DATA : BEGIN OF it_res OCCURS 0,
    bukrs LIKE bkpf-bukrs,
    gjahr LIKE bkpf-gjahr,
    monat LIKE bkpf-monat,
    belnr LIKE bkpf-belnr,
    budat LIKE bkpf-budat,
    brnch LIKE bkpf-brnch,
    gsber LIKE bseg-gsber,
    hkont LIKE bseg-hkont,
    kunnr LIKE bseg-kunnr,
    bschl LIKE bseg-bschl,
    prctr LIKE bseg-prctr,
    kostl LIKE bseg-kostl,
    aufnr LIKE bseg-aufnr,
    pswsl LIKE bseg-pswsl,
    wrbtr LIKE bseg-wrbtr,
    waers LIKE bkpf-waers,
    dmbtr LIKE bseg-dmbtr,
    xblnr LIKE bkpf-xblnr,
    txt50 LIKE skat-txt50,
    sgtxt LIKE bseg-sgtxt,
    shkzg LIKE bseg-shkzg,
    END OF it_res.
    Open Item
    SELECT *
    INTO CORRESPONDING FIELDS OF TABLE it_res
    FROM <b>BSIS</b>
    WHERE bukrs = p_bukrs
    <b>AND HKONT IN S_HKONT</b>
    AND belnr IN s_belnr
    AND gjahr IN s_gjahr
    AND monat IN s_monat
    AND blart IN s_blart
    AND budat IN s_budat
    AND bldat IN s_bldat
    AND waers IN s_waers.
    Cleared Item
    SELECT *
    APPENDING CORRESPONDING FIELDS OF TABLE it_res
    FROM <b>BSAS</b>
    WHERE bukrs = p_bukrs
    <b>AND HKONT IN S_HKONT</b>
    AND belnr IN s_belnr
    AND gjahr IN s_gjahr
    AND monat IN s_monat
    AND blart IN s_blart
    AND budat IN s_budat
    AND bldat IN s_bldat
    AND waers IN s_waers.
    Max
    Message was edited by: max bianchi

  • Asset aquisition report (urgent help needed from abap guys working on FI m)

    hi all,
    i have to develop Asset Aquisition report.so i have developed it.
    but in this i am not getting logic for the following---
    if i enter a date like -19.12.2006
    then the output of this report should show all the asset aquisition of the
    company from  01.04.2006 to 19.12.2006 only.
    bcoz in indian scenario fiscal year starts from 1st of april only.
    but in my output it is showing all the asset aquisition from the day comapny was
    started having its asset aquisition.
    so plz if anyone has logic for above sceanario then plz share with me.
    or any one has previously worked on this report can send the code to me
    satisfying the above scenario. its very very urgent guys.
    my id - [email protected]
    i am looking for the reply

    hi srinivas thanks for ur reply but it is not clear to me .
    so if u will send me the code the it will be better for me .
    my id- [email protected]
    i am waiting for ur reply. if u have code for this then plz send me.
    thanks yaar in advance

  • Pricing : ABAP to Java conversion help needed

    Hi all.
    I am basically an ABAP developer. My recent assignment needs some java coding.
    It will be very helpful if we anybody helps me in finding the corresponding pricing fields in java.
    The abap code is as follows
    check : xkomv - kgrpe  = '  '.
    check: xkomv - xkbetr ne 0.
    check : komp - kpein ne 0.
    if komp - netwr < 0.
      komp - netpr = 0 - komp - netpr.
    endif.
    xkwert  = (        (  ( komp - netpr * ( 100000 + xkomv - xkbetr))     / 100000)
    komp-mglme / komp-kumza * komp - kumne / 1000 / komp - kpein )
      - komp-netwr.
    Please help in converting this abap code to its corresponding java code.
    Thanks and Regards
    Deepika

    Here is the code I have developed: Please check and let me know if there are any changes
    import java.math.BigDecimal;
    import com.sap.spe.pricing.customizing.PricingCustomizingConstants;
    import com.sap.spe.pricing.transactiondata.PricingTransactiondataConstants;
    import com.sap.spe.pricing.transactiondata.userexit.IPricingConditionUserExit;
    import com.sap.spe.pricing.transactiondata.userexit.IPricingItemUserExit;
    import com.sap.spe.pricing.transactiondata.userexit.ValueFormulaAdapter;
    public class ZS2S_IPC_ZDCP extends ValueFormulaAdapter {
          public BigDecimal overwriteConditionValue(
                IPricingItemUserExit item,
                IPricingConditionUserExit condition) {
                BigDecimal kompKumza = new BigDecimal(String.valueOf(condition.getFraction().getNumerator()));
                BigDecimal kompKumne = new BigDecimal(String.valueOf(condition.getFraction().getDenominator()));
                boolean xkomvKgrpe = condition.isGroupCondition();
                BigDecimal kompKpein = condition.getPricingUnit().getValue();    
                BigDecimal kompNetwr  = item.getNetValue().getValue();
                BigDecimal kompNetpr  = item.getNetPrice().getValue();
                BigDecimal xkomvKbetr = condition.getConditionRate().getValue();
                BigDecimal kompMglme = item.getBaseQuantity().getValue();
                  if ( xkomvKgrpe = true )
                      return PricingTransactiondataConstants.ZERO;
                  if ( kompKumza != PricingTransactiondataConstants.ZERO )
                    return PricingTransactiondataConstants.ZERO;
                if ( kompKumne != PricingTransactiondataConstants.ZERO )
                      return PricingTransactiondataConstants.ZERO;   
                if ( kompKpein != PricingTransactiondataConstants.ZERO )
                        return PricingTransactiondataConstants.ZERO;
                if (kompNetwr.compareTo(PricingTransactiondataConstants.ZERO) < 0 )
                      kompNetpr = (PricingTransactiondataConstants.ZERO).subtract(kompNetwr);
                 BigDecimal y = new BigDecimal("100000");
                BigDecimal a = y.add(xkomvKbetr);
                BigDecimal temp = kompNetpr.multiply(a);
                BigDecimal result1 = temp.divide(y, 2, BigDecimal.ROUND_HALF_UP);
                BigDecimal result2 = result1.multiply(kompMglme)
                                         .divide(kompKumza, 2 BigDecimal.ROUND_HALF_UP).multiply(kompKumne).divide(kompKpein, 2,  BigDecimal.ROUND_HALF_UP);
                BigDecimal Result = result2.subtract(kompNetwr);
              return Result;
    Edited by: Deepika Mallya on Aug 6, 2009 9:08 AM

  • Need one abap program.....pls help

    Hi all,
    i have need one ABAP program , which can dispaly how many same number of charecter are there.
    ex : my input is  suresh.
    output is,,,
    2 - s
    1 - u
    1 - r
    just like that..
    pls help me..
    thanks in advance.
    indu

    Hello
    Try this:
    data: string(100),
          length type i.
    data: begin of itab occurs 0,
          chart,
          count type i,
          end of itab.
    string = 'suresh'.
    length = strlen( string ).
    do length times.
      length = length - 1.
      clear itab.
      itab-chart = string+length(1).
      itab-count = 1.
      collect itab.
    enddo.
    loop at itab.
      write: itab-chart, itab-count. new-line.
    endloop.

  • Need help to master ABAP

    I need help to master ABAP.
    Please email me....if u can help me : [email protected]
    I am looking for help with IDOC, ALE, RFC and BAPI.
    Please send me mail. We can talk more.

    Jeff,  please ask specific questions here.  The answer will come.  Try to not ask for material to be sent directly to you.  This is not in the community spirit as it will only benefit you.  Also you might want to try the search functionality on this site.  There is plenty of info out there.
    Regards,
    RIch HEilman

  • Help needed in writing a small piece of ABAP Code

    Subject : look up in an ODS and update in a characteristic routine (BI 7.0)  
    Hi ,
    My requirement is : I have data coming from both legacy as well as SAP Systems. The user wants both legacy as well as SAP fields data in their reports.
    I have a Standard DSO ( say DSO1) with all the legacy fields with direct mappings from Legacy sytem along with couple of SAP fields which are not mapped as of now.
    I have few more DSO's which have just the legacy field and corresponding SAP field data.
    like DSO 2 with ZCOMPCODE and 0COMPCODE data.
    All i have to do is write a Routine for unmapped 0COMPCODE field in DSO1 that pulls up corrersponding 0COMPCODE values for ZCOMPCODE from DSO 2 .
    *Could someone please help me with the Coding part of the Routine.*
    Greatly appreciate your help.

    CREATE OR REPLACE FUNCTION fucntion_name(latA IN NUMBER, longA IN NUMBER, latB IN NUMBER, longB IN NUMBER) RETURN NUMBER
    IS
    pi      CONSTANT NUMBER:=3.14159;
    theta NUMBER;
    distX  NUMBER;
    distY  NUMBER;
    distZ  NUMBER;
    distP  NUMBER;
    BEGIN
    theta :=longA - longB;
    distX :=sin( latA * PI /180) * sin ( latB * PI /180) + cos ( latA * PI/180) * cos ( latB * PI/180) * cos ( theta * PI / 180);
    distY :=acos(distX); --this is arc cosine
    distZ :=distY * 180/PI;  --PI refers to the mathematical PI
    distP :=distZ * 60 * 1.1515; --this value should be returned. Of course the intermediate variable names don't matter.
    RETURN distP;
    END;Edited by: Ora on May 3, 2011 11:46 PM

  • How to put restriction/variable in BI 7.0 ? Is there any settings required?

    Hello,
    I am working on BI 7. I want to know ""How to put restriction/variable in BI 7.0 ? Is there any settings required? I am putting some variables in BI 7.0 while making some query""
    amit shetye.

    Hi Amith,
              just create a new query  like a previous  versions how u create..  and  now  select particular charecterstic  in the  left side window itself.. and drill down it.. and create  a variable..  and assign all the properties to that variable.. now  drag that particular variable.. in to the Rows  or filters..
         for Restrictions...  put any charecterstics into Free charecterstics.. and right clcik that and select  Restriction. now you need to give  the  values.. based on that  it will  RESTRICT THE VALUES..
    BI 7.0 reporting features
    http://searchsap.techtarget.com/cgi-bin/rd.pl/ftID-1121728-ctID-1064004?//expert/KnowledgebaseAnswer/0,289625,sid21_gci1064004,00.html
    http://help.sap.com/saphelp_nw04s/helpdata/en/9d/24ff4009b8f223e10000000a155106/content.htm
    https://www.sdn.sap.com/irj/sdn/developerareas/bi?rid=/webcontent/uuid/ba95531a-0e01-0010-5e9b-891fc040a66c [original link is broken]
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/F9D041D6392AE3E10000000A422035/frameset.htm
    BI7.0
    For greater information on reporting.....
    Good Knowledge in BW Reporting
    regards
    @jay

Maybe you are looking for

  • Error while pinging Web service in SUP.

    Hi all, I am trying to consume a Web Service through SUP. I have taken a sample Web service [http://www.webservicex.net/ConvertTemperature.asmx?WSDL] . But when I trying to establish a connection from sybase Wrokspace and ping the web service It is g

  • PO greater than Shopping Cart Qty

    Friends, We are working on extended classic scenario where PO is created as follow-on document from shopping cart. User can create PO in sourcing cockpit using Process PO option. However here user has the option to change PO qty where system accepts

  • S_ALR_87011774 returns the message u0093Program 9PSM does not exist

    Hi Dear Gurus, I have been given a   task to add a t-code to a role and i did that but when the user execute the transaction the transaction S_ALR_87011774 returns the message “Program 9PSM does not exist. how to fix it. i did run the SU53 report and

  • IBook G3 (USB): Unable to connect to the internet

    Good Morning; I am having a problem with my iBook G3 Model M7701ll, 600 mhz which I just bought. The iBook is running OS 10.4.7 I live remote and my only connection to the web is dial up with a 24.4K connection on my G4 using a external USB Modem. I

  • Can you adjust preset title effects on Final Cut Pro X

    Im trying to play with the anchor points on a preset title effect called DRAMATICA.  The lettes LEAVE too quickly and don´t allow enough time to be read. Can that be done? Is it possible to adjust the titles setting?  Can the anchor point be adjusted