cancel
Showing results for 
Search instead for 
Did you mean: 

SAPscript issue

Former Member
0 Kudos

I have modified a standard SAPscript .Only the script in SE71 has been copied to a Z script, not the print program attached to it, as the changes required was only for the layout. Now the customer wants to change the time format from 24 hr format to 12 hour format in the script. Is it possible to do it within the sapscript, or should the print program be modified?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You have followed the SAP best practice for modifying SAPScript layout set.

You can accomplish what you want by inserting a PERFORM into your layout set....

If you're not familiar with this, research available documentation or search the forum....

Essentially....

/:DEFINE &NEWTIME& = ' '

/: PERFORM <subroutine> in program <customer program with subroutines>

/: USING <timefield>

/:CHANGING &NEWTIME&

/:ENDPERFORM

In your subroutine, convert to 12-hour format with code(few easy lines) or possibly with an FM...

then use your &NEWTIME& in your form output line.

Your subroutine in your customer program reads a table of type ITCSY on the INPUT side (your using values)

and outputs a table of the same type on the output side (your changing parameters).