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

CR01 BDC ?

Former Member
0 Likes
1,338

I want to do BDC program for transaction code CR01.

Can anybody suggest me with coding ?

Thanks

I want to do BDC program for transaction code CR01.

Can anybody suggest me with coding ?

Thanks

4 REPLIES 4
Read only

Former Member
0 Likes
1,036

SAP recommends standard program RCRAPDX2 for work centers (transaction SXDA/Goto/DX-Program Library/WorkCenterLogistics)

Use LSMW tool with Standard batch/Direct input radio button selected in step 1, then choose object 0260, method 0000

Read only

Former Member
0 Likes
1,036

Hi Naresh....

Try to send me wht flat file they have provide U and what are the fields.

Other than that its difficult to code...

If You need sample You can search in same Forum.

Regards,

sg

Read only

0 Likes
1,036

The Fields are below and i want to update from excel.

plant, work centre, work centre catagory, work centre discription, Capacity catagory, Base unit of measure,

capacity utilization, NO.OF INDIVIDUAL CAPACITIES, START TIME,

FINISH TIME,

Read only

Former Member
0 Likes
1,036

Hi Naresh,

Try this code, it may be helps to you. if its ok please reward points.

----


  • Report Name : ZBDC_CR01 *

  • Description : This program will upload Work Center Details *

  • Data Transfer type : BDC *

  • Date : 03.04.2008 *

  • Created by : Ravi Kumar.S *

----


report ZBDC_CR01 no standard page heading line-size 255.

&----


&

& Internal Table Declaration &

&----


&

Types: begin of typ_out,

arbpl type rc68a-arbpl, "work centre code

werks type rc68a-werks, "plant

verwe(4), "Resourse category

stext type p1000-stext, "work center description

veran(3), "person responsible

stand type p3000-stand, "Location

planv1(3), "usage

vgwts1 type p3000-vgwts, "standard value key

steus type p3003-steus, "control key

vgexx1(3) type c, "UOM1

vgexx2(3) type c, "UOM2

vgexx3(3) type c, "UOM3

vgexx4(3) type c, "UOM4

pic(5) type c, "pic

planv2 type p3000-planv, "Usage

vgwts2 type p3000-vgwts, "Standard value key

kapart1(3), "Capacity category1

  • palnr type kako-planr, "Planner Group

mosid(2) type c, "shift Grouping

kalid(2) type c, "Factory calendar ID

meins1(3) type c, "UOM5

begzt(08), "Start time

endzt(08), "Finish time

ngrad type kako-ngrad, "Capacity utilization

aznor(03), "Number of individual capacities

meins2 type kako-Meins, "UOM6

datuv type kaza-datuv, "valid from

datub type kaza-datub, "valid to

sprog type kaza-sprog, "shift sequence

kapart2 type rc68a-kapart, "sechdule category2

fort1 type p3005-fort1, "setup Formula

fort2 type p3005-fort2, "Processing Formula

kostl type crkeyk-kostl, "Cost Center

larxx1 type rc68a-larxx, "Activity Type 1

leinh1 type rc68a-leinh, "Activity Unit 1

forxx1 type rc68a-forxx, "Formula key 1

larxx2 type rc68a-larxx, "Activity Type 2

leinh2 type rc68a-leinh, "Activity Unit 2

forxx2 type rc68a-forxx, "Formula key 2

larxx3 type rc68a-larxx, "Activity Type 3

leinh3 type rc68a-leinh, "Activity Unit 3

forxx3 type rc68a-forxx, "Formula key 3

larxx4 type rc68a-larxx, "Activity Type 4

leinh4 type rc68a-leinh, "Activity Unit 4

forxx4 type rc68a-forxx, "Formula key 4

end of typ_out.

DATA: TA_CR01 type standard table of typ_out initial size 0,

WA_CR01 type typ_out.

Data: ta_excel type standard table of alsmex_tabline initial size 0,

wa_excel type alsmex_tabline.

    • >>> For Work Center Upload

Data: ta_bdcdata type standard table of bdcdata ,

wa_bdcdata type bdcdata,

ta_bdcmessage type table of bdcmsgcoll,

wa_bdcmessage type bdcmsgcoll.

Data: tp_currentrow type i.

constants : cn_batch(4) type c value 'CR01',

cn_tcode(4) type c value 'CR01' .

&----


&

& Selection Screen &

----


&

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

PARAMETERS : PA_FILE TYPE IBIPPARMS-PATH OBLIGATORY.

SELECTION-SCREEN : END OF BLOCK BLK1 .

----


&

  • At Selection-Screen &*

----


&

AT SELECTION-SCREEN ON VALUE-REQUEST FOR PA_FILE.

CALL FUNCTION 'F4_FILENAME'

EXPORTING

FIELD_NAME = 'PA_FILE'

IMPORTING

FILE_NAME = PA_FILE.

&----


&

& Start Of Selection &

&----


&

start-of-selection.

perform upload.

perform bdc_open.

perform bdc_screens .

perform bdc_close.

call transaction 'SM35'.

&----


*& Form upload

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM upload .

call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'

EXPORTING

filename = PA_FILE

i_begin_col = 2

i_begin_row = 2

i_end_col = 255

i_end_row = 65000

TABLES

intern = ta_excel

EXCEPTIONS

INCONSISTENT_PARAMETERS = 1

UPLOAD_OLE = 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.

  • Sorting table by Rows and Columns.

SORT TA_EXCEL BY ROW COL.

  • Get First ROW retrieved.

READ TABLE ta_excel into wa_excel INDEX 1.

  • Set First Row retrieved to Current Row

TP_CURRENTROW = wa_excel-row.

loop at ta_excel into wa_excel.

  • Reset Values for Next Row

IF WA_EXCEL-ROW NE TP_CURRENTROW.

APPEND WA_CR01 TO TA_CR01.

CLEAR WA_CR01.

TP_CURRENTROW = WA_EXCEL-ROW.

ENDIF.

CASE WA_EXCEL-COL.

WHEN '0001'.

WA_CR01-ARBPL = WA_EXCEL-VALUE.

WHEN '0002'.

WA_CR01-WERKS = WA_EXCEL-VALUE.

WHEN '0003'.

WA_CR01-VERWE = WA_EXCEL-VALUE.

WHEN '0004'.

WA_CR01-STEXT = WA_EXCEL-VALUE.

WHEN '0005'.

WA_CR01-VERAN = WA_EXCEL-VALUE.

WHEN '0006'.

WA_CR01-STAND = WA_EXCEL-VALUE.

WHEN '0007'.

WA_CR01-PLANV1 = WA_EXCEL-VALUE.

WHEN '0008'.

WA_CR01-VGWTS1 = WA_EXCEL-VALUE.

WHEN '0009'.

WA_CR01-STEUS = WA_EXCEL-VALUE.

WHEN '0010'.

WA_CR01-VGEXX1 = WA_EXCEL-VALUE.

WHEN '0011'.

WA_CR01-VGEXX2 = WA_EXCEL-VALUE.

WHEN '0012'.

WA_CR01-VGEXX3 = WA_EXCEL-VALUE.

WHEN '0013'.

WA_CR01-VGEXX4 = WA_EXCEL-VALUE.

WHEN '0014'.

WA_CR01-PIC = WA_EXCEL-VALUE.

WHEN '0015'.

WA_CR01-PLANV2 = WA_EXCEL-VALUE.

WHEN '0016'.

WA_CR01-VGWTS2 = WA_EXCEL-VALUE.

WHEN '0017'.

WA_CR01-KAPART1 = WA_EXCEL-VALUE.

  • WHEN '0000'.

  • WA_CR01-PLANR = WA_EXCEL-VALUE.

WHEN '0018'.

WA_CR01-MOSID = WA_EXCEL-VALUE.

WHEN '0019'.

WA_CR01-KALID = WA_EXCEL-VALUE.

WHEN '0020'.

WA_CR01-MEINS1 = WA_EXCEL-VALUE.

WHEN '0021'.

WA_CR01-BEGZT = WA_EXCEL-VALUE.

WHEN '0022'.

WA_CR01-ENDZT = WA_EXCEL-VALUE.

WHEN '0023'.

WA_CR01-NGRAD = WA_EXCEL-VALUE.

WHEN '0024'.

WA_CR01-AZNOR = WA_EXCEL-VALUE.

WHEN '0025'.

WA_CR01-MEINS2 = WA_EXCEL-VALUE.

WHEN '0026'.

WA_CR01-DATUV = WA_EXCEL-VALUE.

WHEN '0027'.

WA_CR01-DATUB = WA_EXCEL-VALUE.

WHEN '0028'.

WA_CR01-SPROG = WA_EXCEL-VALUE.

WHEN '0029'.

WA_CR01-KAPART2 = WA_EXCEL-VALUE.

WHEN '0030'.

WA_CR01-FORT1 = WA_EXCEL-VALUE.

WHEN '0031'.

WA_CR01-FORT2 = WA_EXCEL-VALUE.

WHEN '0032'.

WA_CR01-KOSTL = WA_EXCEL-VALUE.

WHEN '0033'.

WA_CR01-LARXX1 = WA_EXCEL-VALUE.

WHEN '0034'.

WA_CR01-LEINH1 = WA_EXCEL-VALUE.

WHEN '0035'.

WA_CR01-FORXX1 = WA_EXCEL-VALUE.

WHEN '0036'.

WA_CR01-LARXX2 = WA_EXCEL-VALUE.

WHEN '0037'.

WA_CR01-LEINH2 = WA_EXCEL-VALUE.

WHEN '0038'.

WA_CR01-FORXX2 = WA_EXCEL-VALUE.

WHEN '0039'.

WA_CR01-LARXX3 = WA_EXCEL-VALUE.

WHEN '0040'.

WA_CR01-LEINH3 = WA_EXCEL-VALUE.

WHEN '0041'.

WA_CR01-FORXX3 = WA_EXCEL-VALUE.

WHEN '0042'.

WA_CR01-LARXX4 = WA_EXCEL-VALUE.

WHEN '0043'.

WA_CR01-LEINH4 = WA_EXCEL-VALUE.

WHEN '0044'.

WA_CR01-FORXX4 = WA_EXCEL-VALUE.

ENDCASE.

ENDLOOP.

append wa_cr01 to ta_cr01.

ENDFORM. " upload

&----


*& Form bdc_open

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM bdc_open .

call function 'BDC_OPEN_GROUP'

EXPORTING

CLIENT = SY-MANDT

  • DEST = FILLER8

GROUP = 'CR01'

  • HOLDDATE = FILLER8

KEEP = 'X'

USER = SY-UNAME

  • RECORD = FILLER1

  • PROG = SY-CPROG

*

  • OTHERS = 11

.

if sy-subrc <> 0.

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

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

endif.

ENDFORM. " bdc_open

&----


*& Form bdc_screens

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM bdc_screens .

loop at ta_cr01 into wa_cr01.

refresh ta_bdcdata.

perform bdc_dynpro using 'SAPLCRA0' '0101'.

perform bdc_field using 'BDC_CURSOR'

'RC68A-VERWE'.

perform bdc_field using 'BDC_OKCODE'

'=NEXT'.

perform bdc_field using 'RC68A-WERKS'

wa_cr01-werks.

perform bdc_field using 'RC68A-ARBPL'

wa_cr01-arbpl.

perform bdc_field using 'RC68A-VERWE'

wa_cr01-verwe.

perform bdc_dynpro using 'SAPLCRA0' '4000'.

perform bdc_field using 'BDC_OKCODE'

'=VORA'.

perform bdc_field using 'P1000-STEXT'

wa_cr01-stext.

perform bdc_field using 'BDC_CURSOR'

'P3000-VGWTS'.

perform bdc_field using 'P3000-VERAN'

wa_cr01-veran.

perform bdc_field using 'P3000-STAND'

wa_cr01-stand.

perform bdc_field using 'P3000-PLANV'

wa_cr01-planv1.

perform bdc_field using 'P3000-VGWTS'

wa_cr01-vgwts1.

perform bdc_dynpro using 'SAPLCRA0' '4000'.

perform bdc_field using 'BDC_OKCODE'

'=KAUE'.

perform bdc_field using 'BDC_CURSOR'

'RC68A-VGEXX(04)'.

perform bdc_field using 'P3003-STEUS'

wa_cr01-steus.

perform bdc_field using 'P3003-STEUS_REF'

'X'.

perform bdc_field using 'RC68A-VGEXX(01)'

wa_cr01-vgexx1.

perform bdc_field using 'RC68A-VGEXX(02)'

wa_cr01-vgexx2.

perform bdc_field using 'RC68A-VGEXX(03)'

wa_cr01-vgexx3.

perform bdc_field using 'RC68A-VGEXX(04)'

wa_cr01-vgexx4.

perform bdc_dynpro using 'SAPLCRA0' '4000'.

perform bdc_field using 'BDC_OKCODE'

'=KAKO'.

perform bdc_field using 'BDC_CURSOR'

'RC68A-KAPART(01)'.

perform bdc_field using 'RC68A-KAPART(01)'

wa_cr01-kapart1.

perform bdc_dynpro using 'SAPLCRK0' '0101'.

perform bdc_field using 'BDC_OKCODE'

'=KAZA'.

  • perform bdc_field using 'KAKT-KTEXT'

  • wa_cr01-ktext.

  • perform bdc_field using 'KAKO-PLANR'

  • 'wei'.

perform bdc_field using 'KAKO-MOSID'

wa_cr01-mosid.

perform bdc_field using 'RC68K-BEGZT'

wa_cr01-begzt.

perform bdc_field using 'RC68K-ENDZT'

wa_cr01-endzt.

perform bdc_field using 'KAKO-NGRAD'

wa_cr01-ngrad.

  • perform bdc_field using 'RC68K-PAUSE'

  • wa_cr01-pause.

perform bdc_field using 'KAKO-AZNOR'

wa_cr01-aznor.

perform bdc_field using 'KAKO-KALID'

wa_cr01-kalid.

perform bdc_field using 'KAKO-MEINS'

wa_cr01-meins1.

perform bdc_field using 'BDC_CURSOR'

'KAKO-KAPTER'.

perform bdc_field using 'KAKO-KAPTER'

'X'.

perform bdc_field using 'RC68K-KAPLPL'

'X'.

perform bdc_dynpro using 'SAPLCRK0' '0116'.

perform bdc_field using 'BDC_CURSOR'

'KAZA-DATUV(01)'.

perform bdc_field using 'BDC_OKCODE'

'=INSI'.

  • perform bdc_field using 'RC68K-VERSN'

  • wa_cr01-versn.

perform bdc_field using 'KAZA_DEFAULT-BEGZT'

wa_cr01-begzt.

perform bdc_field using 'KAZA_DEFAULT-ENDZT'

wa_cr01-endzt.

  • perform bdc_field using 'KAZA_DEFAULT-PAUSE'

  • wa_cr01-pause.

perform bdc_field using 'KAZA_DEFAULT-NGRAD'

wa_cr01-ngrad.

  • perform bdc_field using 'KAZA_DEFAULT-ANZHL'

  • wa_cr01-anzhl.

  • perform bdc_field using 'KAKT-KTEXT'

  • wa_cr01-ktext.

perform bdc_dynpro using 'SAPLCRK0' '0116'.

perform bdc_field using 'BDC_CURSOR'

'KAZA-SPROG(01)'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

  • perform bdc_field using 'RC68K-VERSN'

  • wa_cr01-versn.

perform bdc_field using 'KAZA_DEFAULT-BEGZT'

wa_cr01-begzt.

perform bdc_field using 'KAZA_DEFAULT-ENDZT'

wa_cr01-endzt.

  • perform bdc_field using 'KAZA_DEFAULT-PAUSE'

  • wa_cr01-pause.

perform bdc_field using 'KAZA_DEFAULT-NGRAD'

wa_cr01-ngrad.

  • perform bdc_field using 'KAZA_DEFAULT-ANZHL'

  • wa_cr01-anzhl.

perform bdc_field using 'KAZA-DATUV(01)'

wa_cr01-datuv.

perform bdc_field using 'KAZA-DATUB(01)'

wa_cr01-datub.

perform bdc_field using 'KAZA-SPROG(01)'

wa_cr01-sprog.

  • perform bdc_field using 'KAKT-KTEXT'

  • wa_cr01-ktext.

perform bdc_dynpro using 'SAPLCRK0' '0116'.

perform bdc_field using 'BDC_CURSOR'

'KAZA-SPROG(01)'.

perform bdc_field using 'BDC_OKCODE'

'=BACK'.

  • perform bdc_field using 'RC68K-VERSN'

  • wa_cr01-versn.

perform bdc_field using 'KAZA_DEFAULT-BEGZT'

wa_cr01-begzt.

perform bdc_field using 'KAZA_DEFAULT-ENDZT'

wa_cr01-endzt.

  • perform bdc_field using 'KAZA_DEFAULT-PAUSE'

  • wa_cr01-pause.

perform bdc_field using 'KAZA_DEFAULT-NGRAD'

wa_cr01-ngrad.

  • perform bdc_field using 'KAZA_DEFAULT-ANZHL'

  • wa_cr01-anzhl.

  • perform bdc_field using 'KAKT-KTEXT'

  • wa_cr01-ktext.

perform bdc_dynpro using 'SAPLCRK0' '0101'.

perform bdc_field using 'BDC_OKCODE'

'=BACK'.

perform bdc_field using 'BDC_CURSOR'

'KAKT-KTEXT'.

  • perform bdc_field using 'KAKT-KTEXT'

  • wa_cr01-ktext.

  • perform bdc_field using 'KAKO-PLANR'

  • 'WEI'.

perform bdc_field using 'RC68K-BEGZT'

wa_cr01-begzt.

perform bdc_field using 'RC68K-ENDZT'

wa_cr01-endzt.

perform bdc_field using 'KAKO-NGRAD'

wa_cr01-ngrad.

  • perform bdc_field using 'RC68K-PAUSE'

  • wa_cr01-pause.

perform bdc_field using 'KAKO-AZNOR'

wa_cr01-aznor.

  • perform bdc_field using 'KAKO-KAPEH'

  • wa_cr01-kapeh.

perform bdc_field using 'KAKO-KALID'

wa_cr01-kalid.

perform bdc_field using 'KAKO-MEINS'

wa_cr01-meins2.

perform bdc_field using 'KAKO-KAPTER'

'X'.

perform bdc_field using 'RC68K-KAPLPL'

'X'.

perform bdc_dynpro using 'SAPLCRK0' '0101'.

perform bdc_field using 'BDC_OKCODE'

'=BACK'.

perform bdc_field using 'BDC_CURSOR'

'KAKT-KTEXT'.

  • perform bdc_field using 'KAKT-KTEXT'

  • wa_cr01-ktext.

  • perform bdc_field using 'KAKO-PLANR'

  • 'WEI'.

perform bdc_field using 'RC68K-BEGZT'

wa_cr01-begzt.

perform bdc_field using 'RC68K-ENDZT'

wa_cr01-endzt.

perform bdc_field using 'KAKO-NGRAD'

wa_cr01-ngrad.

  • perform bdc_field using 'RC68K-PAUSE'

  • wa_cr01-pause.

perform bdc_field using 'KAKO-AZNOR'

wa_cr01-aznor.

  • perform bdc_field using 'KAKO-KAPEH'

  • wa_cr01-kapeh.

perform bdc_field using 'KAKO-KALID'

wa_cr01-kalid.

perform bdc_field using 'KAKO-MEINS'

wa_cr01-meins1.

perform bdc_field using 'KAKO-KAPTER'

'X'.

perform bdc_field using 'RC68K-KAPLPL'

'X'.

perform bdc_dynpro using 'SAPLCRA0' '4000'.

perform bdc_field using 'BDC_OKCODE'

'=TERM'.

perform bdc_field using 'BDC_CURSOR'

'P3006-FORK1(01)'.

perform bdc_dynpro using 'SAPLCRA0' '4000'.

perform bdc_field using 'BDC_OKCODE'

'=VK11'.

perform bdc_field using 'BDC_CURSOR'

'P3005-FORT2'.

perform bdc_field using 'RC68A-KAPART'

wa_cr01-kapart2.

perform bdc_field using 'P3005-FORT1'

wa_cr01-fort1.

perform bdc_field using 'P3005-FORT2'

wa_cr01-fort2.

perform bdc_dynpro using 'SAPLCRA0' '4000'.

perform bdc_field using 'BDC_OKCODE'

'=UPD'.

perform bdc_field using 'BDC_CURSOR'

'RC68A-FORXX(04)'.

  • perform bdc_field using 'P1001-BEGDA'

  • wa_cr01-begda.

  • perform bdc_field using 'P1001-ENDDA'

  • wa_cr01-endda.

perform bdc_field using 'CRKEYK-KOSTL'

wa_cr01-kostl.

perform bdc_field using 'RC68A-LARXX(01)'

wa_cr01-larxx1.

perform bdc_field using 'RC68A-LARXX(02)'

wa_cr01-larxx2.

perform bdc_field using 'RC68A-LARXX(03)'

wa_cr01-larxx3.

perform bdc_field using 'RC68A-LARXX(04)'

wa_cr01-larxx4.

perform bdc_field using 'RC68A-LEINH(01)'

wa_cr01-leinh1.

perform bdc_field using 'RC68A-LEINH(02)'

wa_cr01-leinh2.

perform bdc_field using 'RC68A-LEINH(03)'

wa_cr01-leinh3.

perform bdc_field using 'RC68A-LEINH(04)'

wa_cr01-leinh4.

perform bdc_field using 'RC68A-FORXX(01)'

wa_cr01-forxx1.

perform bdc_field using 'RC68A-FORXX(02)'

wa_cr01-forxx2.

perform bdc_field using 'RC68A-FORXX(03)'

wa_cr01-forxx3.

perform bdc_field using 'RC68A-FORXX(04)'

wa_cr01-forxx4.

  • perform bdc_transaction using 'CR01'.

call function 'BDC_INSERT'

exporting

tcode = 'CR01'

tables

dynprotab = ta_bdcdata.

if sy-subrc <> 0.

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

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

endif.

  • PERFORM BDC_INSERT.

ENDLOOP.

ENDFORM. " bdc_screens

&----


*& Form BDC_INSERT

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


*FORM BDC_INSERT .

*

*CALL FUNCTION 'BDC_INSERT'

  • EXPORTING

  • TCODE = 'CR01'

    • POST_LOCAL = NOVBLOCAL

    • PRINTING = NOPRINT

    • SIMUBATCH = ' '

    • CTUPARAMS = ' '

  • TABLES

  • DYNPROTAB = ta_bdcdata

    • EXCEPTIONS

    • INTERNAL_ERROR = 1

    • NOT_OPEN = 2

    • QUEUE_ERROR = 3

    • TCODE_INVALID = 4

    • PRINTING_INVALID = 5

    • POSTING_INVALID = 6

    • OTHERS = 7

  • .

*IF SY-SUBRC <> 0.

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

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

*ENDIF.

*

*

*ENDFORM. " BDC_INSERT

&----


*& Form bdc_close

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM bdc_close .

call function 'BDC_CLOSE_GROUP'

  • EXCEPTIONS

  • NOT_OPEN = 1

  • QUEUE_ERROR = 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.

ENDFORM. " bdc_close

&----


*& Form bdc_dynpro

&----


  • text

----


  • -->P_1269 text

  • -->P_1270 text

----


form bdc_dynpro using program type sy-repid

dynpro type any.

WA_BDCDATA-PROGRAM = PROGRAM.

WA_BDCDATA-DYNPRO = DYNPRO.

WA_BDCDATA-DYNBEGIN = 'X'.

append wa_bdcdata to ta_bdcdata.

clear wa_bdcdata.

endform. " bdc_dynpro

&----


*& Form bdc_field

&----


  • text

----


  • -->P_1329 text

  • -->P_1330 text

----


form bdc_field using fnam type any

fval type any.

  • IF FVAL <> ''.

WA_BDCDATA-FNAM = FNAM.

WA_BDCDATA-FVAL = FVAL.

append wa_bdcdata to ta_bdcdata.

clear wa_bdcdata.

  • ENDIF.

endform. " bdc_field

Edited by: Ravi Kumar on May 9, 2008 12:23 PM