Skip to Content
0
Former Member
Jul 01, 2012 at 09:53 AM

Reg: Creation of BDC for CN21 Transaction (Networking with Activity Elements both Internal and External)

83 Views

Dear Experts,

I have taken a recording for CN21 transaction for Network, Activities and Activity Elements. The recording is shown below, I'm not getting a hint to develop a BDC Program. Can anyone help me to write a BDC Program.

{code}

include bdcrecx1.

start-of-selection.

perform open_group.

perform bdc_dynpro using 'SAPLCOKO' '2000'.

perform bdc_field using 'BDC_CURSOR'

'CAUFVD-DISPO'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'CAUFVD-PROFID'

'ACC1100'.

perform bdc_field using 'AUFPAR-PS_AUFART'

'ACC1'.

perform bdc_field using 'CAUFVD-WERKS'

'1100'.

perform bdc_field using 'CAUFVD-DISPO'

'001'.

perform bdc_dynpro using 'SAPLCOKO' '2100'.

perform bdc_field using 'BDC_CURSOR'

'CAUFVD-KTEXT'.

perform bdc_field using 'BDC_OKCODE'

'=ZUOR'.

perform bdc_field using 'CAUFVD-KTEXT'

'Network Abdur Recording'.

perform bdc_field using 'CAUFVD-GLTRP'

'25.06.2012'.

perform bdc_field using 'CAUFVD-AUTERM'

'X'.

perform bdc_field using 'CAUFVD-TERKZ'

'2'.

perform bdc_field using 'CAUFVD-AUKBED'

'X'.

perform bdc_dynpro using 'SAPLCOKO' '2100'.

perform bdc_field using 'BDC_OKCODE'

'=STEU'.

perform bdc_field using 'CAUFVD-KTEXT'

'Network Abdur Recording'.

perform bdc_field using 'BDC_CURSOR'

'CAUFVD-PROJN'.

perform bdc_field using 'CAUFVD-PROJN'

'CKSAE.CA22.01'.

perform bdc_field using 'CAUFVD-SCOPE'

'OCOST'.

perform bdc_dynpro using 'SAPLCOKO' '2100'.

perform bdc_field using 'BDC_CURSOR'

'CAUFVD-KTEXT'.

perform bdc_field using 'BDC_OKCODE'

'=VERW'.

perform bdc_field using 'CAUFVD-KTEXT'

'Network Abdur Recording'.

perform bdc_field using 'CAUFVD-DISPO'

'001'.

perform bdc_field using 'CAUFVD-AUFKT'

'1'.

perform bdc_field using 'CAUFVD-KALSM'

'PP-PC1'.

perform bdc_field using 'CAUFVD-KLVARP'

'PS02'.

perform bdc_field using 'CAUFVD-KLVARI'

'PS03'.

perform bdc_field using 'CNDOK-NW_PLANCOST'

'2'.

perform bdc_field using 'CAUFVD-AUDISP'

'1'.

perform bdc_dynpro using 'SAPLCOKO' '2100'.

perform bdc_field using 'BDC_CURSOR'

'CAUFVD-KTEXT'.

perform bdc_field using 'BDC_OKCODE'

'=TEXT'.

perform bdc_field using 'CAUFVD-KTEXT'

'Network Abdur Recording'.

perform bdc_dynpro using 'SAPLCOKO' '2100'.

perform bdc_field using 'BDC_CURSOR'

'CAUFVD-KTEXT'.

perform bdc_field using 'BDC_OKCODE'

'=ZUOR'.

perform bdc_field using 'CAUFVD-KTEXT'

'Network Abdur Recording'.

perform bdc_dynpro using 'SAPLCOKO' '2100'.

perform bdc_field using 'BDC_CURSOR'

'CAUFVD-KTEXT'.

perform bdc_field using 'BDC_OKCODE'

'=LIST'.

perform bdc_field using 'CAUFVD-KTEXT'

'Network Abdur Recording'.

perform bdc_field using 'CAUFVD-PRONR'

'CKSAE.CA22'.

perform bdc_field using 'CAUFVD-PROJN'

'CKSAE.CA22.01'.

perform bdc_field using 'CAUFVD-SCOPE'

'OCOST'.

* Activity

perform bdc_dynpro using 'SAPLCOVG' '2000'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'BDC_CURSOR'

'AFVGD-LTXA1(01)'.

perform bdc_field using 'AFVGD-LTXA1(01)'

'Internal Activity1'.

perform bdc_dynpro using 'SAPLCOVG' '2000'.

perform bdc_field using 'BDC_OKCODE'

'=LISE'.

perform bdc_field using 'BDC_CURSOR'

'AFVGD-VORNR(02)'.

perform bdc_field using 'RC27X-FLG_SEL(02)'

'X'.

perform bdc_field using 'AFVGD-LTXA1(02)'

'Internal Activity2'.

perform bdc_dynpro using 'SAPLCOVG' '2000'.

perform bdc_field using 'BDC_CURSOR'

'VSNETEXT-KTEXT'.

perform bdc_field using 'BDC_OKCODE'

'=FRML'.

perform bdc_dynpro using 'SAPLCOVG' '2000'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'BDC_CURSOR'

'RC27X-FLG_SERV(01)'.

perform bdc_field using 'RC27X-FLG_SERV(01)'

'X'.

perform bdc_field using 'AFVGD-LTXA1(01)'

'EXTERNAL ELEMENT for Internal Activity2'.

* Activity Element

perform bdc_dynpro using 'SAPLMLSP' '0200'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'BDC_CURSOR'

'ESLL-KSTAR(01)'.

perform bdc_field using 'RM11P-NEW_ROW'

'10'.

perform bdc_field using 'ESLL-KTEXT1(01)'

'External Service for Int activity2'.

perform bdc_field using 'ESLL-MENGE(01)'

'1'.

perform bdc_field using 'ESLL-MEINS(01)'

'no'.

perform bdc_field using 'ESLL-TBTWR(01)'

'20'.

perform bdc_field using 'ESLL-KSTAR(01)'

'501006'.

perform bdc_dynpro using 'SAPLMLSP' '0200'.

perform bdc_field using 'BDC_OKCODE'

'=ESB'.

perform bdc_field using 'BDC_CURSOR'

'ESLL-KTEXT1(01)'.

perform bdc_field using 'RM11P-NEW_ROW'

'10'.

* Going Back

perform bdc_dynpro using 'SAPLCOVG' '2000'.

perform bdc_field using 'BDC_CURSOR'

'VSNETEXT-KTEXT'.

perform bdc_field using 'BDC_OKCODE'

'=BACK'.

perform bdc_dynpro using 'SAPLCOVG' '2000'.

perform bdc_field using 'BDC_CURSOR'

'VSNETEXT-KTEXT'.

perform bdc_field using 'BDC_OKCODE'

'=FRML'.

* Activity

perform bdc_dynpro using 'SAPLCOVG' '2000'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'BDC_CURSOR'

'AFVGD-LTXA1(01)'.

perform bdc_field using 'AFVGD-LTXA1(01)'

'External Activity1'.

perform bdc_dynpro using 'SAPLCOVG' '2000'.

perform bdc_field using 'BDC_OKCODE'

'=LISE'.

perform bdc_field using 'BDC_CURSOR'

'RC27X-FLG_SERV(02)'.

perform bdc_field using 'RC27X-FLG_SERV(02)'

'X'.

perform bdc_field using 'AFVGD-LTXA1(02)'

'External Activity2'.

perform bdc_dynpro using 'SAPLMLSP' '0200'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'BDC_CURSOR'

'ESLL-KSTAR(01)'.

perform bdc_field using 'RM11P-NEW_ROW'

'10'.

perform bdc_field using 'ESLL-KTEXT1(01)'

'External Service for activity2'.

perform bdc_field using 'ESLL-MENGE(01)'

'20'.

perform bdc_field using 'ESLL-MEINS(01)'

'no'.

perform bdc_field using 'ESLL-TBTWR(01)'

'300'.

perform bdc_field using 'ESLL-KSTAR(01)'

'501006'.

perform bdc_dynpro using 'SAPLMLSP' '0200'.

perform bdc_field using 'BDC_OKCODE'

'=ESB'.

perform bdc_field using 'BDC_CURSOR'

'ESLL-KTEXT1(01)'.

perform bdc_field using 'RM11P-NEW_ROW'

'10'.

perform bdc_dynpro using 'SAPLCOVG' '2000'.

perform bdc_field using 'BDC_CURSOR'

'VSNETEXT-KTEXT'.

perform bdc_field using 'BDC_OKCODE'

'=ARBL'.

perform bdc_dynpro using 'SAPLCOVG' '2000'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'BDC_CURSOR'

'AFVGD-LTXA1(03)'.

perform bdc_field using 'AFVGD-LTXA1(03)'

'Internal Activity3'.

perform bdc_dynpro using 'SAPLCOVG' '2000'.

perform bdc_field using 'BDC_CURSOR'

'VSNETEXT-KTEXT'.

perform bdc_field using 'BDC_OKCODE'

'=FRML'.

perform bdc_dynpro using 'SAPLCOVG' '2000'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'BDC_CURSOR'

'AFVGD-LTXA1(03)'.

perform bdc_field using 'AFVGD-LTXA1(03)'

'External Activity3'.

perform bdc_dynpro using 'SAPLCOVG' '2000'.

perform bdc_field using 'BDC_CURSOR'

'VSNETEXT-KTEXT'.

perform bdc_field using 'BDC_OKCODE'

'=BACK'.

perform bdc_dynpro using 'SAPLCOKO' '2100'.

perform bdc_field using 'BDC_CURSOR'

'CAUFVD-KTEXT'.

perform bdc_field using 'BDC_OKCODE'

'=BU'.

perform bdc_field using 'CAUFVD-KTEXT'

'Network Abdur Recording'.

perform bdc_field using 'CAUFVD-PRONR'

'CKSAE.CA22'.

perform bdc_field using 'CAUFVD-PROJN'

'CKSAE.CA22.01'.

perform bdc_field using 'CAUFVD-SCOPE'

'OCOST'.

perform bdc_transaction using 'CN21'.

perform close_group.

{code}

Thanks and Regards,

Abdur Rafique