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

BDC coding Error ,

Former Member
0 Likes
545

Hi,

I have error in the coding any one Please correct it

I mention where the error coming in<b> Bold</b> in the Coding, this execute for single applicant number for other common person it not working.

Any one give a suggestion

&&&&&&&&&& From Declaration in include Statement&&&&&&&&&&&&&&&&&&&&&&&&&

----


***INCLUDE LZRECRUITERF01 .

----


&----


*& Form bdc_dynpro

&----


  • text

----


  • -->P_0033 text

  • -->P_0034 text

----


FORM bdc_dynpro USING VALUE(P_0033)

VALUE(P_0034).

CLEAR BDCTAB.

BDCTAB-PROGRAM = P_0033.

BDCTAB-DYNPRO = P_0034.

BDCTAB-DYNBEGIN = 'X'.

APPEND BDCTAB.

ENDFORM. " bdc_dynpro

&----


*& Form bdc_field

&----


  • text

----


  • -->P_0038 text

  • -->P_0039 text

----


FORM bdc_field USING VALUE(P_0038)

VALUE(P_0039).

CLEAR BDCTAB.

BDCTAB-FNAM = P_0038.

BDCTAB-FVAL = P_0039.

APPEND BDCTAB.

ENDFORM. " bdc_field

&&&&&&&&&& End of From Delcaralation in include Statement&&&&&&&&&&&&&&&&&&&&&&&&&

&&&&&&&&&& Data Declaration in include Statement&&&&&&&&&&&&&&&&&&&&&&&&&

LZRECRUITERTOP

FUNCTION-POOL ZRECRUITER. "MESSAGE-ID ..

DATA : BDCTAB LIKE BDCDATA OCCURS 0 WITH HEADER LINE,

BDCMSG LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.

&&&&&&&&&& End of Data Declaration in include Statement&&&&&&&&&&&&&&&&&&&&&&&&&

*%%%%%%%%%%%%%Function Module Coding Starts %%%%%%%%%%%%%%%%%%%%%%%

FUNCTION ZAPPL_EMAIL_APP_TESTING.

*"----


""Local interface:

*" IMPORTING

*" REFERENCE(APRAISAL_ID) LIKE OBJEC-OBJID

*"----


DATA: BEGIN OF ITAB OCCURS 0,

APPL_NO like hrp1001-objid,

today like sy-datum,

END OF ITAB.

itab-today = sy-datum.

append itab.

  • To get the Applicant Number

select single objid into ITAB-APPL_NO from hrp1001 where otype = 'AP' and plvar = '01' and sclas = 'BA' and sobid = apraisal_id.

LOOP AT ITAB.

REFRESH BDCTAB.

perform bdc_dynpro using 'SAPMPAP3' '1000'.

perform bdc_field using 'BDC_CURSOR'

'RPAPP-APLNO'.

perform bdc_field using 'BDC_OKCODE'

'=VIEW'.

perform bdc_field using 'RPAPP-APLNO'

'1322'. <b> => Here When i Give like this it working</b>

  • ITAB-APPL_NO. <b> => I gvie like this it not workong</b>

perform bdc_dynpro using 'SAPMPAP3' '1500'.

perform bdc_field using 'BDC_CURSOR'

'RPAPP-BEGDA'.

perform bdc_field using 'BDC_OKCODE'

'=INSS'.

perform bdc_dynpro using 'SAPMPAP3' '2000'.

perform bdc_field using 'BDC_CURSOR'

'PC3AC-RCTK2'.

perform bdc_field using 'BDC_OKCODE'

'=SAVE'.

perform bdc_field using 'PC3AC-APACT'

'056'.

perform bdc_field using 'PC3AC-PLDAT'

ITAB-today. " '24.05.2007'.

perform bdc_field using 'PC3AC-PLTIM'

'00:00'.

perform bdc_field using 'PC3AC-IDTXT'

'ZASSESSMENT'.

perform bdc_field using 'PC3AC-RCTK2'

'X'.

perform bdc_dynpro using 'SAPMPAP3' '1500'.

perform bdc_field using 'BDC_CURSOR'

'PAPPL-ASHTX(01)'.

perform bdc_field using 'BDC_OKCODE'

'=MOVE'.

perform bdc_field using '*QPAPL-SELEC(01)'

'X'.

perform bdc_dynpro using 'SAPMPAP3' '2000'.

perform bdc_field using 'BDC_CURSOR'

'PC3AC-PLDAT'.

perform bdc_field using 'BDC_OKCODE'

'=MOVE'.

perform bdc_field using 'PC3AC-PLDAT'

  • ITAB-today."

'24.05.2007'.

perform bdc_field using 'PC3AC-PLTIM'

'10:25'.

perform bdc_dynpro using 'SAPMPAP3' '1500'.

perform bdc_field using 'BDC_CURSOR'

'PAPFI-ASHTX(01)'.

perform bdc_field using 'BDC_OKCODE'

'=SEL'.

perform bdc_dynpro using 'SAPMPAP3' '2000'.

perform bdc_field using 'BDC_CURSOR'

'PC3AC-APACT'.

perform bdc_field using 'BDC_OKCODE'

'=MAIL'.

perform bdc_field using 'PC3AC-APACT'

'056'.

perform bdc_field using 'PC3AC-PLDAT'

'24.05.2007'.

perform bdc_field using 'PC3AC-PLTIM'

'10:25'.

perform bdc_field using 'PC3AC-IDTXT'

'ZASSESSMENT'.

perform bdc_field using 'PC3AC-RCTK2'

'X'.

perform bdc_dynpro using 'SAPLHRCC' '0100'.

perform bdc_field using 'BDC_OKCODE'

'=SEND'.

perform bdc_field using 'BDC_CURSOR'

'TAB_TEL-TEXT(01)'.

perform bdc_field using 'RP50G-SELEC(01)'

'X'.

*perform bdc_transaction using 'PB60'.

*

*perform close_group.

CALL TRANSACTION 'PB60' USING bdctab MODE 'N' UPDATE 'A' MESSAGES INTO BDCMSG.

*if sy-subrc <> 0.

**move-corresponding itab to it_error.

*endif.

*READ TABLE BDCMSG WITH KEY MSGTYP = 'E'.

*CALL FUNCTION 'FORMAT_MESSAGE'

*EXPORTING

*ID = BDCMSG-MSGID

*LANG = 'EN'

*NO = BDCMSG-MSGNR

*V1 = BDCMSG-MSGV1

*V2 = BDCMSG-MSGV2

*V3 = BDCMSG-MSGV3

*V4 = BDCMSG-MSGV4

*IMPORTING

*MSG = BDCMSG-MSGV1

    • EXCEPTIONS

    • NOT_FOUND = 1

    • OTHERS = 2

*.

*IF SY-SUBRC <> 0.

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

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

*ENDIF.

*WRITE 😕 BDCMSG-MSGNR,BDCMSG-MSGV1.

ENDLOOP.

ENDFUNCTION.

*%%%%%%%%%%%%%Function Module Coding Ends %%%%%%%%%%%%%%%%%%%%%%%

Regards

Surjith

3 REPLIES 3
Read only

Former Member
0 Likes
496

surjith,

Is it a syntaxt error ?

expected functionality is not working at runtime ?

Regards

Srikanth M

Read only

0 Likes
496

Hi,

It is not syntax error every thing execute well, but it not giving output if i gave the applicant number through internal table.

Regards,

Surjith

Read only

Former Member
0 Likes
496

Hi

May be data is not there in the internal table. You just check the data by giving the conditions which u gave for select statement in the database table.

What is this appraisal_id in the select condition.

select single objid

into ITAB-APPL_NO

from hrp1001

where otype = 'AP'

and plvar = '01'

and sclas = 'BA'

and sobid = <b>apraisal_id</b>.

Regards

Haritha.