Skip to Content

PO date based on country


the scenario is order is created from web and sent to SAP for PO creation. SOAP to RFC scenario.

the requirement is if order is for country USA, the PO date should be USA date. The PO date of SAP should be current date & time of the country. The country may change and it will come in input to PI.

how can we send the date based on country to SAP. how this can be achieved in PI mapping.


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Dec 02, 2014 at 08:02 AM


    In my opinion the best is to configure the different time hour difference per country in a value-mapping. To choose the best way to do a value-mapping check this document: Value Mapping - Which is the best option.


    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 02, 2014 at 04:35 PM


    Here is the sample code for your reference.You need to modify the below code a bit as per your requirement .

    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.TimeZone;

    * Simple Java program to convert local time into GMT or any other TimeZone in Java
    * SimpleDateFormat in Java can be used to convert Date from one timezone to other

    public class TimeZoneConverter {

        public static void main(String args[]) {
         //Date will return local time in Java 
         Date localTime = new Date();
         //creating DateFormat for converting time from local timezone to GMT
         DateFormat converter = new SimpleDateFormat("dd/MM/yyyy:HH:mm:ss");
         //getting GMT timezone, you can get any timezone e.g. UTC
         System.out.println("local time : " + localTime);;
         System.out.println("time in GMT : " + converter.format(localTime));

    local time : Wed Apr 11 05:48:16 VET 2012
    time in GMT : 11/04/2012:10:18:16


    You need to give "GMT" or country name as input paramter .Take below doc as reference for this input.You can either use Value mapping/fix values/look up based on your flexibilty.

    TimeZone (Java Platform SE 7 )



    Add comment
    10|10000 characters needed characters exceeded