Friday, June 21, 2013

ABAP - Getting the text of the month

parameters: gdate type begda.
data: gv_test type char10,
gv_month1 type char4,
gv_text type char20,
gv_test1 type char4.


    select single ltx from t247 into gv_test
       where spras eq 'E'
         and mnr eq gdate+4(2) .

    call function 'HR_FR_DADSU_CONVERT_UPPERCASE'
      exporting
        im_no_spesym      = 'X'
        im_no_punctuation = 'X'
      changing
        ch_text           = gv_test.

move gv_test to gv_test1.

  move gdate+0(4to gv_month1.
  concatenate gdate+6(2'-' gv_test1 '-'  gv_month1 into gv_text .

  write: gv_text.




No comments:

Post a Comment