cancel
Showing results for 
Search instead for 
Did you mean: 

Date and Time issue in SAP SUP..

Former Member
0 Kudos

Hi Experts,

Could you please help me to solve my date time issue.

I am totally new for SUP and i am getting error while creating travel request

I am creating travel request passing the fields as input (Emp Id., Travel Start Date, Travel End Date, Travel Start Time,.... etc) and on clicking create travel request button i am getting an error System.FormatException: String was not recognized as a valid DateTime.

Please find attachment for same and kindly help me to resolve my issue.

Thanks a ton in advance..


Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Jitendra,

RFC Side:

I have changed some parameters in my RFC and pass my result value in simple string type message parameter.

MBO Side:


Date and Time has been assigned properly in MBO as well as Logical Type of Date and Time edit boxes make it to Date & Time respectively.

Note: I tried a lot for doing to solve that issue (Hit and trial method) u can say just do proper mapping with all fields and your RFC logic should be cleared.


Cheers,

Prachi

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

cool.. thanks for sharing the solution

Regards,

Jitendra

Former Member
0 Kudos

Hi Experts,

Solved..

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Prachi,

could you please share the solution/steps so that it would be useful for us for similar scenarios

Regards,

Jitendra

Former Member
0 Kudos

Hi Experts,

Thanks a lot your replies..

I have done many changes in my RFC and as well as MBO which i am mentioning below but i am still getting same problem..

RFC Changes:

1) I have passed default values of date in my import parameters.

2) I have create my own export parameter to get my result value now not in table.

MBO Changes (SUP):

1) I have given all my import date and time parameters as date and time type.

2) I have checked the Logical Type of Date and Time edit boxes and make it to Date & Time respectively.

3) The DateField returned from the Backend system might be NULL value. In the screen it is trying to load the DateField but it was null so it was ruturn error message. Eventhough you selected the field as nullable in the MBO development. (Done)

4)  Change all place where i can define date and time field as same date and time type

5) Pass default values also.

Note: 1) Through RFC and MBO Preview my travel request is easily created

           2) Done some control panel date and time setting of system

But when i am running my application its getting same error..

Note: The solution i can suggest was change the Custom.js file write your own code to handle this null value. (How and where i am handle it please give my steps)...

I am new for sup that's why i am not applicable how to handle this issue now and not understand prob as well..

Thanks in advance please help me experts


former_member186566
Active Participant
0 Kudos

hi,

Have you done your parameter mappings properly?

  • open you workflow application
  • goto screen design->select menu item "create travel request"
  • view properties->parameter mappings.
  • check you have select the proper parameter type, mapping type and key.
  • if you didnt assign keys for date filed, please create a new key.
  • Ex: create new key travale_star_date_key and assign with the parameter mappings.
  • also you have assign this key to text field "Travel Start Date" field.

If parameter mappings are fine, You can do a workaround for this issue.

  • Open the Custom.js.
  • write the below custom code in "customBeforeMenuItemClick" method
    • if(scree="xxx" and menuitem=="travvel start date"){
    • var datexxx=new Date(document.getElementById("date_attribute_key_name").value);
    • assign back to "date_attribute_key_name"
    • document.getElementById("date_attribute_key_name").value=datexxx;
    • }

Regards

Yokesvaran.K

midhun_vp
Active Contributor
0 Kudos

Even I haven't faced this issue I would suggest to keep the data type of the date field as string in the BAPI/RFC.

- Midhun VP

Former Member
0 Kudos

hi,

Do check the Logical Type of Date and Time edit boxes.

U'll find it in properties of these.

If it is a text, make it to Date & Time respectively.

Hope it helps you.

Regards

Ajay

Former Member
0 Kudos

Hello

Please refer to

SAP Note 1869615  - HWC operation fails with NULL Values Not Supported Error

or

http://dcx.sybase.com/index.html#sup0220/en/com.sybase.infocenter.dc01206.0222/doc/html/mqu127378038...

or

http://scn.sap.com/thread/1994959

Hope helpful