Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

smartforms

0 Likes
709

hi friends,

I am using FM 'HR_READ_FOREIGN_OBJECT_TEXT' to get text to display in the smartform. But it is not getting the text . My code follow as below.....plz thanks in advance.

&----


*& Report Z_EXPERIENCE_LETTER

*&

&----


*&

*&

&----


REPORT Z_EXPERIENCE_LETTER.

TABLES : PERNR,PA0001,PA0002,P1000,T528T.

INFOTYPES : 0000,

0001,

0002.

TYPES : BEGIN OF ZEXP,

PERNR TYPE PERNR_D,

VORNA TYPE VORNA,

NACHN TYPE NACHN,

BTRTL TYPE BTRTL,

PLANS TYPE PLANS,

ORGEH TYPE ORGEH,

BEGDA TYPE BEGDA,

ENDDA TYPE ENDDA,

PERSK TYPE PERSK,

END OF ZEXP.

DATA : IT_OUTPUT TYPE ZEXP_LINE,

WA_OUTPUT TYPE ZEXP_LINE.

DATA : FMN TYPE RS38L_FNAM.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001 .

SELECTION-SCREEN SKIP.

PARAMETERS p_cc(40) type c OBLIGATORY.

SELECTION-SCREEN END OF BLOCK B1.

GET PERNR.

END-OF-SELECTION.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = 'ZHR_EXPERIANCE_LETTER'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = FMN

  • EXCEPTIONS

  • NO_FORM = 1

  • NO_FUNCTION_MODULE = 2

  • OTHERS = 3

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION FMN

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

VORNA = P0002-VORNA

NACHN = P0002-NACHN

BTRTL = P0001-BTRTL

PLANS = P0001-PLANS

ORGEH = P0001-ORGEH

BEGDA = P0000-BEGDA

ENDDA = P0000-ENDDA

PERSK = P0001-PERSK

P_CC = P_CC

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

  • PERNR =

TABLES

IT_OUTPUT = IT_OUTPUT

  • EXCEPTIONS

  • FORMATTING_ERROR = 1

  • INTERNAL_ERROR = 2

  • SEND_ERROR = 3

  • USER_CANCELED = 4

  • OTHERS = 5

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION 'HR_READ_FOREIGN_OBJECT_TEXT'

EXPORTING

OTYPE = 'S'

OBJID = '50000094'

  • COSTCENTER =

  • CONTROLLINGAREA =

  • STATUS = '1'

BEGDA = '20100721'

ENDDA = '99991231'

  • REFERENCE_DATE = SY-DATUM

LANGU = 'E'

  • IMPORTING

  • SHORT_TEXT =

  • OBJECT_TEXT =

  • COSTCENTER_NAME =

  • INTEGRATION_ACTIVE =

  • RETURN =

  • EXCEPTIONS

  • NOTHING_FOUND = 1

  • WRONG_OBJECTTYPE = 2

  • MISSING_COSTCENTER_DATA = 3

  • MISSING_OBJECT_ID = 4

  • OTHERS = 5

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Moderator message: please use more descriptive subject lines and code formatting from now on.

Edited by: Thomas Zloch on Aug 4, 2010 1:47 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
673

Hi,

Try to call the FM 'HR_READ_FOREIGN_OBJECT_TEXT' before the FM 'SSF_FUNCTION_MODULE_MANE'.

And check where you are passing the Output(Text) of the FM in the form.

OR

You can try using the FM 'READ_TEXT'.

Regards,

Rajesh

7 REPLIES 7
Read only

Former Member
0 Likes
674

Hi,

Try to call the FM 'HR_READ_FOREIGN_OBJECT_TEXT' before the FM 'SSF_FUNCTION_MODULE_MANE'.

And check where you are passing the Output(Text) of the FM in the form.

OR

You can try using the FM 'READ_TEXT'.

Regards,

Rajesh

Read only

0 Likes
673

i tried it .plz see the code which i sent already.plz help me out.

Moderator message: please do not use SMS speak.

Edited by: Thomas Zloch on Aug 4, 2010 1:48 PM

Read only

0 Likes
673

Hi,

Did you get that....

If not, try to use FM 'READ_TEXT' to display the text in the form output.

Pass ID, NAME, OBJECT to the FM 'READ_TEXT' and get the text in the structure , you defined for text.

If possible, send the modified code and how you are passing the text in form.

Regards

Rajesh

Read only

0 Likes
673

IN T527X TABLE I AM NOT GETTING NAME OBJECT.PLZ

SHAFI.B

Moderator message: Please do not use all upper case in the future.

Edited by: Thomas Zloch on Aug 4, 2010 1:49 PM

Read only

0 Likes
673

PLS SEE THE CODE BELOW IF ANYTHING WORNG PLZ MODIFY

&----


*& Report Z_EXPERIENCE_LETTER

*&

&----


*&

*&

&----


REPORT Z_EXPERIENCE_LETTER.

TABLES : PERNR,PA0001,PA0002,P1000,T528T,t527x.

INFOTYPES : 0000,

0001,

0002.

TYPES : BEGIN OF ZEXP,

PERNR TYPE PERNR_D,

VORNA TYPE VORNA,

NACHN TYPE NACHN,

BTRTL TYPE BTRTL,

PLANS TYPE PLANS,

ORGEH TYPE ORGEH,

BEGDA TYPE BEGDA,

ENDDA TYPE ENDDA,

PERSK TYPE PERSK,

END OF ZEXP.

DATA : IT_OUTPUT TYPE ZEXP_LINE,

WA_OUTPUT TYPE ZEXP_LINE.

DATA : FMN TYPE RS38L_FNAM.

************************************

*data : v_short type p1000-short.

*data : v_obtext type p1000-stext.

***********************************

DATA : ld_orgtx(40) type c.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001 .

SELECTION-SCREEN SKIP.

PARAMETERS p_cc(40) type c." OBLIGATORY.

SELECTION-SCREEN END OF BLOCK B1.

GET PERNR.

************************************

select single orgtx

from t527x

into ld_orgtx

where orgeh eq '50000050'and "Replace with org. unit field

sprsl eq 'EN'

and endda ge sy-datum and

begda le sy-datum .

*************************************

END-OF-SELECTION.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = 'ZHR_EXPERIANCE_LETTER'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = FMN

  • EXCEPTIONS

  • NO_FORM = 1

  • NO_FUNCTION_MODULE = 2

  • OTHERS = 3

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

************************************

CALL FUNCTION FMN

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

VORNA = P0002-VORNA

NACHN = P0002-NACHN

BTRTL = P0001-BTRTL

PLANS = P0001-PLANS

ORGEH = P0001-ORGEH

BEGDA = P0000-BEGDA

ENDDA = P0000-ENDDA

PERSK = P0001-PERSK

P_CC = P_CC

ORGTX = T527X-ORGTX

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

  • PERNR =

TABLES

IT_OUTPUT = IT_OUTPUT

  • EXCEPTIONS

  • FORMATTING_ERROR = 1

  • INTERNAL_ERROR = 2

  • SEND_ERROR = 3

  • USER_CANCELED = 4

  • OTHERS = 5

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Read only

0 Likes
673

Hi,

Well, you read the value from table t527x into variable ld_orgtx, but then you pass T527X-ORGTX to your smartform. You would find this with some fairly simple bebugging.

Also,

Please mark your program with code tags to make it readable

Please consider the forum rules with regards the use of upper case.

Regards,

Nick

Read only

0 Likes
673

Closed issue. thanks all...