How to change the date value in FM SD_CUSTOMER_HIERARCHY_PATH

Hi,
I have one requirement while creating sales order the pricing herarchy should be
based on the date mentioned in the Delivery date. Generally the pricing hierarchy
happens based on system date.
So how to get the hierarchy based on the date mentioned in the delivery date ?
I analysed in debugging if I change the date field in debugging mode in the function module
SD_CUSTOMER_HIERARCHY_PATH then i am getting the pricing hierarchy based on the desired date
other then system date.
   CALL FUNCTION 'SD_CUSTOMER_HIERARCHY_PATH'
           EXPORTING
                CUSTOMER        = lvf_knvh_kunnr
                DATE            = SY-DATLO -
> Desired Date menioned
                HTYPE           = fif_hityp
                SALES_CHANNEL   = fis_sdorgdata-vtweg
                SALES_DIVISION  = fis_sdorgdata-spart
                SALES_ORG       = fis_sdorgdata-vkorg
           IMPORTING
                CUSTOMER_HZUOR  = lvf_customer_hizuor
           TABLES
                HPATH           = lvt_hierarchy_partners
           EXCEPTIONS
                HITYP_NOT_EXIST = 1
                NODE_NOT_EXIST  = 2
                PARVW_NOT_EXIST = 3
                OTHERS          = 4.
The Field for delivery date I mentioned is RV45A-KETDAT and this value is not appearing in this
position of function module.
Can any one have Idea to change the hierarchy based on the desired date other than system date.
Waiting for kind response.
Best Regards,
Bansidhar

Hi,
I have one requirement while creating sales order the pricing herarchy should be
based on the date mentioned in the Delivery date. Generally the pricing hierarchy
happens based on system date.
So how to get the hierarchy based on the date mentioned in the delivery date ?
I analysed in debugging if I change the date field in debugging mode in the function module
SD_CUSTOMER_HIERARCHY_PATH then i am getting the pricing hierarchy based on the desired date
other then system date.
   CALL FUNCTION 'SD_CUSTOMER_HIERARCHY_PATH'
           EXPORTING
                CUSTOMER        = lvf_knvh_kunnr
                DATE            = SY-DATLO -
> Desired Date menioned
                HTYPE           = fif_hityp
                SALES_CHANNEL   = fis_sdorgdata-vtweg
                SALES_DIVISION  = fis_sdorgdata-spart
                SALES_ORG       = fis_sdorgdata-vkorg
           IMPORTING
                CUSTOMER_HZUOR  = lvf_customer_hizuor
           TABLES
                HPATH           = lvt_hierarchy_partners
           EXCEPTIONS
                HITYP_NOT_EXIST = 1
                NODE_NOT_EXIST  = 2
                PARVW_NOT_EXIST = 3
                OTHERS          = 4.
The Field for delivery date I mentioned is RV45A-KETDAT and this value is not appearing in this
position of function module.
Can any one have Idea to change the hierarchy based on the desired date other than system date.
Waiting for kind response.
Best Regards,
Bansidhar

Similar Messages

  • How to change the date format?

    Hi,
    I need to display the data format as(YYYY-MM-DD). But now it displays(2009-1-9)
    Here is my code snippet which i used to display the data format as(2009-1-9)
    *<INPUT TYPE=TEXT NAME="date_submitted" MAXLENGTH=20 SIZE=10 VALUE="" onBlur= "return dateSubmitted()">  (YYYY-MM-DD)*
    *<SCRIPT LANGUAGE="javascript">*
    dateSubmitted()
    *</SCRIPT>*
    function dateSubmitted()
                        if (document.pgUpdate.date_submitted.value == "")
                             date = new Date();     
                             month = date.getMonth() + 1     
                             document.pgUpdate.date_submitted.value =
                                            date.getYear() + "-" + month + "-" + date.getDate();
                        return true;
    Can anybody help me how to change the date format?
    Thanks in advance!

    prit123 wrote:
    use SimpleDateFormat class. The code is :He posted a Javascript related question, not a Java related question.
    Please use forums devoted to Javascript. You're here at a Java/JSP forum.
    There are JS forums at webdeveloper.com and dynamicdrive.com. Good luck.
    String formatPattern = "yyyy-mm-dd";
    SimpleDateFormat sdf = new SimpleDateFormat(formatPattern);
    sdf.format(yourdate);yyyy-mm-dd denotes year-minutes-days. Please go read the SimpleDateFormat API as well.

  • How to get the date value

    Hi everyone!
    I want to change the status of button(OK -> Run) after choosen the date .(ex :the textbox default value is 2009/10/14,I choose the date 2009/10/10 from the B1 calendar form)
    But after the status changed from OK -> Run,but the choosen date value doesnt change.
    Anyone can tell me how change the date value. Thanks a lot
    Code :
    If pVal.BeforeAction Then
    Else
                    If pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED Then
                        Select Case pVal.ItemUID
                            Case "201"        ' date item                                                                               
    Button = form.Items.Item("3").Specific
                                    Button.Caption = "Run"
                         End Select
                    End If
    End If

    SELECT *
    FROM your_table
    WHERE date_column = to_date('25-Jan-07', 'dd-Mon-yy')Why oh why oh why are you using dates with two-digits representing the year? In my opinion, this is bad and wrong. Be explicit; use 4 digits. is your "07" representing 1907? 2007? 2107?

  • How to change a date value from "java.util.Date" to "java.sql.Date"?

    Hi all,
    How to change a date value from "java.util.Date" to "java.sql.Date"?
    I m still confusing what's the difference between them.....
    thanks
    Regards,
    Kin

    Thanks
    but my sql statement can only accept the format (yyyy-MM-dd)
    such as "select * from xx where somedate = '2004-12-31'
    but when i show it to screen, i want to show it as dd-MM-yyyy
    I m using the following to change the jave.util.Date to str and vice versa. But it cannot shows the dd-MM-yyyy. I tried to change the format from yyyy-MM-dd to dd-MM-yyyy, it shows the wrong date in my application.
         public String date2str(java.util.Date thisdate)     {
              if (thisdate != null)     {
                   java.sql.Date thissDate = new java.sql.Date(thisdate.getTime());
                   return date2str(thissDate);
              }     else     {
                   return "";
         public String date2str(java.sql.Date thisdate)     {
              if (thisdate != null)     {
                   SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
                   return sdf.format(thisdate);
              }     else     {
                   return "";
         public java.util.Date str2date(String thisdate)     {
              String dateFormat = "yyyy-MM-dd"; // = 1998-12-31
              java.util.Date returndate = null;
              if (thisdate != null)     {
                   SimpleDateFormat dateFormatter = new SimpleDateFormat(dateFormat);
                   try {
                        returndate = dateFormatter.parse(thisdate);
                   } catch (ParseException pe) {
                        System.out.println (pe.getMessage());
              return returndate;
         }

  • How to change the date format  YYYYMMDD to MM/DD/YYYY

    Hi ,
    How to change the date format  YYYYMMDD to MM/DD/YYYY .
    Ex :  20071008  to 10/08/2007
    Is there any function module for this ??
    Regards
    Rahul

    Hi Sharma,
    check the code:
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-031.
    PARAMETERS: date1 RADIOBUTTON GROUP rad1 DEFAULT 'X', "SAP date format YYYYDDMM
    date2 RADIOBUTTON GROUP rad1, "Date format like aprial31, 2006
    date3 RADIOBUTTON GROUP rad1, "Date format like 31 apr,2006
    date4 RADIOBUTTON GROUP rad1, "Date format like DD/MM/YYYY
    date5 RADIOBUTTON GROUP rad1. "Date format like DD.MM.YYYY
    SELECTION-SCREEN END OF BLOCK b2
    FORM getmonth .
    SELECT mnr
    ktx
    ltx
    INTO TABLE T_month
    FROM t247
    WHERE spras = 'EN'.
    IF sy-subrc NE '0'.
    MESSAGE I "Message - Not able to get month values from the table T247
    ENDIF.
    ENDFORM.
    DATA : temp_date(16) TYPE c,
    temp1_date(60) TYPE c,
    year(4) TYPE c,
    daymonth(11) TYPE c,
    daymonth1(11) TYPE c,
    month(9) TYPE c,
    day(2) TYPE c,
    mon LIKE t247-ktx,
    len TYPE i .
    MOVE date TO temp1_date .
    CONDENSE temp1_date NO-GAPS.
    MOVE temp1_date TO temp_date .
    IF date2 EQ 'X'. "The date format is like Aprial 31, 2007
    CONDENSE temp_date NO-GAPS.
    SPLIT date AT ',' INTO daymonth year.
    IF STRLEN( year ) NE '4'.
    error = 'X'.
    WRITE : 'Invalid date format.'.
    ELSE.
    daymonth1 = daymonth.
    CONDENSE daymonth1 NO-GAPS.
    _len = STRLEN( _daymonth1 ).
    l_len = 13 - len.
    SHIFT daymonth1 RIGHT BY len PLACES.
    CONDENSE daymonth1 NO-GAPS.
    month = daymonth1.
    CONDENSE month NO-GAPS.
    SORT t_month BY monthltx.
    READ TABLE t_month WITH KEY monthltx = month.
    IF sy-subrc <> 0.
    error = 'X'.
    WRITE : 'Invalid date format.' .
    ELSE.
    len = STRLEN( month ).
    CONDENSE daymonth NO-GAPS.
    SHIFT daymonth LEFT BY len PLACES.
    day = daymonth.
    CONDENSE day NO-GAPS.
    CONCATENATE year t_month-monthnumber day INTO o_date.
    ENDIF.
    ENDIF.
    ELSEIF p_date3 EQ 'X'. "The date format is like 31 apr, 2007
    CONDENSE temp_date NO-GAPS.
    SPLIT i_date AT ',' INTO daymonth year.
    IF STRLEN( year ) NE '4'.
    error = 'X'.
    WRITE : 'Invalid date format.'.
    ELSE.
    daymonth1 = daymonth.
    CONDENSE daymonth1 NO-GAPS.
    SHIFT daymonth1 LEFT BY 2 PLACES.
    CONDENSE daymonth1 NO-GAPS.
    month = daymonth1.
    CONDENSE month NO-GAPS.
    TRANSLATE month TO UPPER CASE.
    SORT t_month BY monthstx.
    MOVE month to mon.
    READ TABLE t_month WITH KEY monthstx = mon.
    IF sy-subrc <> 0.
    error = 'X'.
    WRITE : 'Invalid date format.' .
    ELSE.
    CONDENSE daymonth NO-GAPS.
    day = daymonth+0(2).
    CONDENSE day NO-GAPS.
    CONCATENATE year t_month-monthnumber day INTO o_date.
    ENDIF.
    ENDIF.
    ELSEIF p_date4 EQ 'X' OR p_date5 EQ 'X'. "Date format is like DD.MM.YYYY or DD/MM/YYYY
    CONDENSE temp_date NO-GAPS.
    IF STRLEN( temp_date ) EQ 10.
    o_date0(4) = temp_date6(4).
    o_date4(2) = temp_date3(2).
    o_date6(2) = temp_date0(2).
    ELSE.
    error = 'X'.
    WRITE : 'Invalid date format.' .
    ENDIF.
    ENDIF.
    IF STRLEN( o_date ) NE '8'.
    error = 'X'.
    WRITE : 'Invalid date format.'.
    ENDIf.
    ENDFORM. " f0100_conv_date
    Reward if helpful.
    Regards,
    Harini.S

  • How to change the profile value in the pl/sql code without making change in the database

    How to change the profile value in the pl/sql code without making change in the database.

    I have program ,where if the profiles 'printer and nunber of copies ' are set at the user level, by default when the report completes the O/p will be sent to the printer mentioned in the set-up. but what user wants is
    if these Profiles are set for the user running this program automatic printing should not be done.

  • How to change the Unitprice value from 2 decimals to 3 decimals in script

    Hi Gurus,
    how to change the Unitprice value from two decimals to three decimals for each item level for PO in script.
    Please provide some possible solutions.
    Thanks,
    V.V.

    Hi,
    Check the options available like
    &VAR(.2)&  this will print 2 decimals
    &VAR(.3)&  this will print 3 decimals
    need to change the value for how many decimals you need
    Thanks & Regards
    Sarves Sombhatla

  • How to change the date and time during OVM installation for Fusion Apps

    Hi,
    The customer is using Fusion Instance which is a V1 (Build 19) OVM installation shipped by Oracle with Demo Data (including seeded user IDs and roles) in it.
    Now they have issue with Date format for the application on the screens is showing MM/DD/YYYY where as it should be (Singapore) Standard is DD/MM/YYYY.
    Q/A: How to change the date/time in OVM image
    Refer SR : 3-5640792461
    Regards
    Ganesh Ananthapadmanaban

    Not a problem. There are a number of other system and network setup commands that you might find useful at some time. From within the Remote Desktop Admin in the Send Unix Command window type:
    networksetup -help
    systemsetup -help
    That will give you lists of the commands, including the one I posted above, with their basic syntax. They're handy to know.
    Cheers.

  • How to extract the date value of IBOR date="12/12/2009"

    I have the following query, but do not get the date value out:
    WITH ibors AS (
    SELECT xmltype('<?xml version="1.0" encoding="utf-8"?>
    <IBOR date="12/12/2009">
    <LIBOR currency="USD">
    <OneYear>1.38875</OneYear>
    </LIBOR>
    </IBOR>
    ') ibor_xml
    FROM dual
    SELECT i.ibor_date, i.ibor_oneyear
    FROM ibors,
    XMLTABLE(
    '//IBOR'
    PASSING ibors.ibor_xml
    COLUMNS ibor_date VARCHAR2(20) PATH '/IBOR/date',
    ibor_oneyear VARCHAR2(20) PATH '/IBOR/LIBOR/OneYear'
    ) i;
    How to extract the date value of <IBOR date="12/12/2009">?

    Hi,
    The date is an attribute of element IBOR. So you must use "@date" in the xpath expression :
    WITH ibors AS (
    SELECT xmltype('<?xml version="1.0" encoding="utf-8"?>
    <IBOR date="12/12/2009">
    <LIBOR currency="USD">
    <OneYear>1.38875</OneYear>
    </LIBOR>
    </IBOR>
    ') ibor_xml
    FROM dual
    SELECT i.ibor_date, i.ibor_oneyear
    FROM ibors,
    XMLTABLE(
    '//IBOR'
    PASSING ibors.ibor_xml
    COLUMNS
    ibor_date VARCHAR2(20) PATH '/IBOR/@date',
    ibor_oneyear VARCHAR2(20) PATH '/IBOR/LIBOR/OneYear'
    ) i;

  • How to change the date format in xml form?

    hi,
    How to change the date format in xml form?
    For example:  11/20/2008 3:00:03 PM    ->   11-20 03:00
    Any opinions greatly appreciated!
    Thanks.
    Edited by: ke wenxing on Dec 2, 2008 8:33 AM

    You could go to System - User Profile - Own Data would take you to the "maintain user profile screen"
    Click the defaults button and change the date format.This changes date format for all the dates in your login.

  • How to change the Data sources after deploying the application ??

    Hi All,
    i want to know how to change the Data sources after deploying the application to the application server ???
    I'm using Oracle Application Server 10g Release 3 (10.1.3.1.0)

    Can you access the Enrprise Manager website of the target Application Server from your location? If so, you can change the datasource in it. If not, yo can bundle the datasource definition in your archive and use that one instead of the one configured in the target OC4J container. Or this will just be the responsability of your customer: whenever you send a new WAR file, they have to modify the datasource if needed and deploy the application?

  • How to compare the date value with the date datatype column?

    Hi,
    I am executed a query to get output for the particular date in two different database.
    I got output in one db environment, but in the another environment i didnt get the output.
    APP_DECISION_DATE column contains date datatype
    ex:
    SQL> select DECISIONED_STAGE_ID,DECISIONED_STAGE_USER_ID from naap10_application where APP_DECISION_DATE = TO_DATE('23-JAN-07',
    'DD-MON-YY'); 2
    DECISIONED_STAGE_ID DECISIONED_STAG
    2006060106 SYSTEM
    DATABASE - II
    SQL> select DECISIONED_STAGE_ID,DECISIONED_STAGE_USER_ID from naap10_application where APP_DECISION_DATE=
    TO_DATE('31-JAN-2007','DD-MON-RRRR') and application_id=2007010028552;
    no rows selected
    in the same db i got the output while i used the TO_DATE(APP_DECISION_DATE)
    SQL> select DECISIONED_STAGE_ID,DECISIONED_STAGE_USER_ID from naap10_application where TO_DATE(APP_DECISION_DATE)=
    TO_DATE('31-JAN-2007','DD-MON-YYYY') and application_id=2007010028552; 2
    DECISIONED_STAGE_ID DECISIONED_STAG
    2006060113 SYSTEM
    is it necessary to use TO_DATE function while i am using the data datatype column in the WHERE CLAUSE?
    Thanks in advance.
    siva

    Sorry & thanks sathish,
    Now i got the result.
    SQL> select DECISIONED_STAGE_ID,DECISIONED_STAGE_USER_ID from naap10_application where APP_DECISION_DATE BETWEEN TO_DATE ('31.01.2007 00:00:00', 'DD.MM.YYYY HH24:MI:SS') AND TO_DATE ('31.01.2007 23:59:59', 'DD.MM.YYYY HH24:MI:SS')
    2 and application_id=2007010028552;
    DECISIONED_STAGE_ID DECISIONED_STAG
    2006060113 SYSTEM
    ================================
    But one doubt,
    When i created the column with the date datatype how it gets the time value,
    And in one environment db i got the result but in another environment i dont get,
    Shall i want to change any session status of date?

  • How to change the Data Foundation for an existing Business Element

    My Issue:
    I have quite a few reports that use the same Business View. The Business View has an under lying Data Foundation that uses a Dynamic Data Connection (DDC). I no longer want to use this DDC because production users are complaining they do not want to have to select a data source each time (multiple times when the report includes sub reports) they run/refresh their reports.
    The Holy Grail:
    I would like to change the Data Foundation that my Business Element layer is built upon and use another data foundation with identical tables, linking, and fields. The new data foundation would be using a production connection. This solves my immediate issue and has a great side benefit of providing a convenient way to promote reports from development to stage/test, to production and would not require production users  to have to select which environment they want their report to run against.
    I am logged in to BVM as administrator:
    When I look at the Business Element layer Property Browser,  I see a Data Foundation Property but is is disabled (such that it can not be changed).
    Is there a way to change the Data Foundation that is used by an existing Business Element layer ?
    I'd appreciate any help that someone can offer on this topic. Even if it is not possible and someone can shed some light on why this would not work or would not be a good idea, I'd be interested in learning

    Technically No the system will not allow you to change as it is involved with many depreciation areas and change is not permitted for control reason.
    You only need to retire the asset, reverse the postings, assign correctly and repost the values.

  • How to change the data in a chart using slider bar ?

    hi community,
       i have issue, i created one SDK extension slider bar based on that i want to change the data in chart.
    my requirement is like, i have month and some measures in a chart  i want to set month in a slider bar if am moving slider according to that values should be change in chart.

    You could try the following.
    Pull the month dimension values into an object, where each dimension value is assigned to a "numeric" (air quotes, actually a string) attribute.
    Something along the lines of:
    var myMonths = new Object();
    myMonths["0"] = <month0_key>;
    myMonths["1"] = <month1_key>;
    Then, you assign the range slider a set of numeric values, from 0 to n, where n is the last attribute in myMonths.  When the user changes the slider values and the OnChange is fired, use the numeric values of the current slider positions to get the appropriate range filter values out of myMonths.
    I've not tried this yet, so I don't yet know what pitfalls you'd run into.
    Cheers,
    Dave

  • How to change the data type in the table ESLL for the field USERF2_NUM ?

    Hello Friends,
    I have a requirement in which one of the change is to convert the data type of the field 'USERF2_NUM' in the table 'ESLL'  from 'QUAN' to 'CHAR'. 
    How do i do it if i have an access to change it..........i think i should also check the impact of the change if done.
    Kindly tell me as my requirement starts with this small change.
    Regards,
    Rajesh Kumar

    Thanks for the reply Sowmya.
    I would like to know 2 things.
    1. Is it ok to change the data type of the field 'USERF2_NUM '  which is in the table ESLL. from quan to char.
    2.  The table ESLL  already has entries. if we change the data type from QUAN to CHAR what is the  effect on the existing entries of the table .
    Kindly reply me back.
    Thanks & Regards,
    Rajesh Kumar

Maybe you are looking for

  • Can not see long text description of a characteristics in portal

    Hi experts, I designed two queries via Query designer and published them to portal but I can not see the the long text description of "Name" attribute belongs to 0BPARTNER characteristics. One of the queries shows only the last name of partner in por

  • I-Pod is synced with another I-Tunes libary

    Hi. I'm having troubles with my i-pod classic (120 GB). My i-pod was synced with my Windows XP verion of i-tunes but i had a computer crash and had to install Windows 7 and could not de-authorised my pod before starting installing Windows 7. After i

  • TS4009 The document "Name" could not be opened. (Numbers file @ iCloud)

    I have a file saved at iCloud that can not be opened anymore. Numbers says: The document "Name" could not be opened.

  • Display sound data value from ByteArrayOutputStream

    hi People, Can advise what is the function that i can use to retrieve or display the data that i stored in ByteArrayoutputStream buffer? So far i can only store the data in... but how can i retrieve and display them on output panel? Many Thanks

  • UNCAUGHT_EXCEPTION on SAPLRRMS

    Hi, The dump arises during the load from PSA to infocube: Runtime Errors         UNCAUGHT_EXCEPTION Exception              CX_RSR_X_MESSAGE Date and Time          28.06.2011 15:20:35     "UNCAUGHT_EXCEPTION" "CX_RSR_X_MESSAGE"     "SAPLRRMS" or "LRRM