cancel
Showing results for 
Search instead for 
Did you mean: 

Date format in 1st January, 2010

Former Member
0 Kudos

Hi all,

1. How can I get or set date having 1st, 2nd 3rd, 5th.. for date.

Ex : for 1 st

2 nd

3 rd

4 th

I want the last digists given in bold. Is there any standard function module

2. How can I get currency fields like $, .... for pound...etc In which table does it stores

thanks,

Prasad

Accepted Solutions (0)

Answers (1)

Answers (1)

sahai
Contributor
0 Kudos

hi,

1) for making it as bold you can make use of tags <strong> </strong>.....

in your logic i have shared a code here for your reference also please go through it.

METHOD wddoinit .

DATA lv_string TYPE string.

DATA formatted_text TYPE string.

DATA formatted_text_obj TYPE REF TO cl_wd_formatted_text.

DATA ex TYPE REF TO cx_wd_general.

DATA element TYPE REF TO if_wd_context_element.

DATA current_controller TYPE REF TO if_wd_controller.

DATA message_manager TYPE REF TO if_wd_message_manager.

DATA lo_el_context TYPE REF TO if_wd_context_element.

DATA ls_context TYPE wd_this->element_context.

DATA lv_fromat_text TYPE wd_this->element_context-fromat_text.

lo_el_context = wd_context->get_element( ).

" use tag <strong> to make the words bold .

lv_string = 1 ' <strong> (st)</strong> '.

formatted_text_obj = cl_wd_formatted_text=>create( xml_text = lv_string ).

lo_el_context->set_attribute( name = `FROMAT_TEXT` value = lv_string ).

TRY.

formatted_text_obj->validate( ).

CATCH cx_wd_general INTO ex.

  • " Error in formatted text

current_controller ?= wd_this->wd_get_api( ).

message_manager = current_controller->get_message_manager( ).

element = wd_context->get_lead_selection( ).

message_manager->report_attribute_exception(

message_object = ex

element = element

attribute_name = `FROMAT_TEXT`

).

ENDTRY.

ENDMETHOD.

2) for currency ...there is a table TCURR,vbak also has a currency field..

also

To find the Reference field for any CURR or QUAN field:

Open the Table/Structure in SE11

Select the Tab : CURRENCY / QUANTITY FIELDS

there you can find the Reference table and Reference fields.

hope thsi may be useful to you.

thanks and regards,

sahai.s