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

can any body explain code below

Former Member
0 Likes
594

start-of-selection. perform open_group. loop at itab. at new pname. line = '01'. endat. if itab-level = '1'. line = '01'. wbs = itab-wbs. endif. perform bdc_dynpro using 'SAPMKBUD' '0200'. perform bdc_field using 'BDC_CURSOR' 'BPDY-TWAER'. perform bdc_field using 'BDC_OKCODE' '/00'. perform bdc_field using 'PROJ-PSPID' itab-pname. perform bdc_field using 'PRPS-POSID' wbs. perform bdc_field using 'BPDY-TWAER' 'pkr'. perform bdc_dynpro using 'SAPLKBPP' '0320'. perform bdc_field using 'BDC_CURSOR' 'BPDY-WERT1(02)'. perform bdc_field using 'BDC_OKCODE' '/00'. cursor = 'BPDY-WERT1'. concatenate cursor '(' line ')' into cursor. perform bdc_field using cursor itab-over_all_budget. perform bdc_dynpro using 'SAPLKBPP' '0320'. perform bdc_field using 'BDC_CURSOR' 'DROPT-PTIME'. perform bdc_field using 'BDC_OKCODE' '=DROT'. perform bdc_field using 'DROPT-PTIME' itab-year. perform bdc_dynpro using 'SAPLKBPP' '0320'. perform bdc_field using 'BDC_CURSOR' 'BPDY-WERT1(09)'. perform bdc_field using 'BDC_OKCODE' '/00'. perform bdc_field using 'DROPT-PTIME' itab-year. perform bdc_field using cursor itab-year_budget. perform bdc_dynpro using 'SAPLKBPP' '0320'. perform bdc_field using 'BDC_CURSOR' 'BPDY-WERT1(09)'. perform bdc_field using 'BDC_OKCODE' '=POST'. " perform bdc_transaction using 'CJ32'." line = line + 1. endloop. perform close_group.FORM OPEN_GROUP. IF SESSION = 'X'. SKIP. WRITE: /(20) 'Create group'(I01), GROUP. SKIP.* open batchinput group CALL FUNCTION 'BDC_OPEN_GROUP' EXPORTING CLIENT = SY-MANDT GROUP = GROUP USER = USER KEEP = KEEP HOLDDATE = HOLDDATE. WRITE: /(30) 'BDC_OPEN_GROUP'(I02), (12) 'returncode:'(I05), SY-SUBRC. ENDIF.ENDFORM.

4 REPLIES 4
Read only

andreas_mann3
Active Contributor
0 Likes
509

hi,

1) try to format your coding with button "Code"

2) prg is a bdc to transaction CJ32

3) start prg. and turn to trx SM35

A.

Message was edited by: Andreas Mann

Read only

Former Member
0 Likes
509

Hello,

This a BDC program.

Regs,

Venkat Ramanan N

Read only

Former Member
0 Likes
509

hi

good

start-of-selection.

perform open_group.

loop at itab.

at new pname. line = '01'.

endat.

if itab-level = '1'.

line = '01'.

wbs = itab-wbs.

endif.

perform bdc_dynpro using 'SAPMKBUD' '0200'.

perform bdc_field using 'BDC_CURSOR' 'BPDY-TWAER'.

perform bdc_field using 'BDC_OKCODE' '/00'.

perform bdc_field using 'PROJ-PSPID' itab-pname.

perform bdc_field using 'PRPS-POSID' wbs.

perform bdc_field using 'BPDY-TWAER' 'pkr'.

perform bdc_dynpro using 'SAPLKBPP' '0320'.

perform bdc_field using 'BDC_CURSOR' 'BPDY-WERT1(02)'.

perform bdc_field using 'BDC_OKCODE' '/00'. cursor = 'BPDY-WERT1'.

concatenate cursor '(' line ')' into cursor.

perform bdc_field using cursor itab-over_all_budget.

perform bdc_dynpro using 'SAPLKBPP' '0320'.

perform bdc_field using 'BDC_CURSOR' 'DROPT-PTIME'.

perform bdc_field using 'BDC_OKCODE' '=DROT'.

perform bdc_field using 'DROPT-PTIME' itab-year.

perform bdc_dynpro using 'SAPLKBPP' '0320'.

perform bdc_field using 'BDC_CURSOR' 'BPDY-WERT1(09)'.

perform bdc_field using 'BDC_OKCODE' '/00'.

perform bdc_field using 'DROPT-PTIME' itab-year.

perform bdc_field using cursor itab-year_budget.

perform bdc_dynpro using 'SAPLKBPP' '0320'.

perform bdc_field using 'BDC_CURSOR' 'BPDY-WERT1(09)'.

perform bdc_field using 'BDC_OKCODE' '=POST'. "

perform bdc_transaction using 'CJ32'." line = line + 1.

endloop. perform close_group.FORM OPEN_GROUP.

IF SESSION = 'X'. SKIP. WRITE: /(20) 'Create group'(I01), GROUP. SKIP.*

open batchinput group

CALL FUNCTION 'BDC_OPEN_GROUP'

EXPORTING CLIENT = SY-MANDT

GROUP = GROUP

USER = USER

KEEP = KEEP

HOLDDATE = HOLDDATE.

WRITE: /(30) 'BDC_OPEN_GROUP'(I02), (12) 'returncode:'(I05), SY-SUBRC.

ENDIF.

ENDFORM.

this is the over all program but this is contain only persoem statement, so it would be tough to give you detail explanation for this.

the code is CJ32 for which this recording is done.

this is a bdc session process.

thanks

mrutyun^

Read only

Former Member
0 Likes
509

Hi !

It's a BDC for the SAP-Transaction CJ32.

Regards

Rainer