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

error during batch input

Former Member
0 Likes
3,366

Hi everybody

Ive run the tcode SHDB to get the recording of transaction XD02, in it, theres an input field called RMCLF-CLASS(01), but when Im running my program, its giving me an error message 'Field RMCLF-CLASS(1) is not an input field'.

Does anybody know why?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,549

I think u havenot define RMCLF-CLASS in ur internal table. If u havenot define in ur internal table thn u will comment(u r not puting data into RMCLF-CLASS field) this field or define into urs internal table.

Thanks & regards

Manish Kumar

15 REPLIES 15
Read only

anversha_s
Active Contributor
0 Likes
2,549

hi anjali,

chk ur XDO2 txn.

in that the field is out put only.

rgds

anver

pls mark points if helped

Read only

0 Likes
2,549

so how should i use it in my program then?

Read only

anversha_s
Active Contributor
0 Likes
2,549

hi,

look this.

in the PBO.

code this.

if sy-binpt is initial. "means its a back gorund job

make it input field.

else.

make it out put only.

endif.

rgds

anver

if helped mark points

Read only

0 Likes
2,549

im sorry but ive never done this before, so how do you do it? i mean make it an input field?wats the code for it?

thanks

Read only

anversha_s
Active Contributor
0 Likes
2,549

hi,

chk this sample.

i did this for thr screen i deveolped.

if urs is a standard screen , i dont know how to do.

Only work in the case of BDC.*********************************

  • IF sy-binpt IS NOT INITIAL.

  • LOOP AT SCREEN.

  • IF screen-name = 'WF_LOEKZ'.

  • screen-active = 1.

  • screen-input = 1.

  • MODIFY SCREEN.

  • ENDIF.

  • ENDLOOP.

  • ENDIF.

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

rgds

anver

if hlped mark points

Read only

0 Likes
2,549

its not working

what im doing in my prog is:

im uploading a text file and then use tcode xd02 to load data

when filling my bdc table, i wrote this code:

IF sy-binpt IS INITIAL.

LOOP AT SCREEN.

IF screen-name = 'RMCLF-CLASS(01)'.

screen-active = 1.

screen-input = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

is it correct?

Read only

Former Member
0 Likes
2,550

I think u havenot define RMCLF-CLASS in ur internal table. If u havenot define in ur internal table thn u will comment(u r not puting data into RMCLF-CLASS field) this field or define into urs internal table.

Thanks & regards

Manish Kumar

Read only

0 Likes
2,549

i am putting data in that field, its not in the internal table, its a field name and it has its corresponding data

Read only

0 Likes
2,549

Hi,

I have used following code to update classification data using transaction XD02. You can use folowing code:'

*Updation of additional sales data - Transaction XD02

  • And classification data

PERFORM bdc_dynpro USING 'SAPMF02D' '0101'.

PERFORM bdc_field USING 'BDC_CURSOR'

'RF02D-D0320'.

PERFORM bdc_field USING 'BDC_OKCODE'

'/00'.

PERFORM bdc_field USING 'RF02D-KUNNR'

g_kunnr.

PERFORM bdc_field USING 'RF02D-BUKRS'

'1000'.

PERFORM bdc_field USING 'RF02D-VKORG'

'1000'.

PERFORM bdc_field USING 'RF02D-VTWEG'

'10'.

PERFORM bdc_field USING 'RF02D-SPART'

'00'.

PERFORM bdc_field USING 'RF02D-D0315'

'X'.

PERFORM bdc_field USING 'RF02D-D0320'

'X'.

PERFORM bdc_dynpro USING 'SAPMF02D' '0315'.

PERFORM bdc_field USING 'BDC_CURSOR'

'KNVV-KZTLF'.

PERFORM bdc_field USING 'BDC_OKCODE'

'/00'.

PERFORM bdc_field USING 'KNVV-KZTLF'

''.

PERFORM bdc_field USING 'KNVV-ANTLF'

'9'.

  • If Classific value is 'A' or 'B' or 'C'

  • Classification value will be updated

IF g_kukla = 'A' OR g_kukla = 'B' OR g_kukla = 'C'.

PERFORM bdc_dynpro USING 'SAPMF02D' '0320'.

PERFORM bdc_field USING 'BDC_CURSOR'

'KNVV-PERFK'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=KLAS'.

PERFORM bdc_field USING 'KNVV-PERFK'

'AM'.

PERFORM bdc_field USING 'KNVV-KKBER '

'1000'.

PERFORM bdc_dynpro USING 'SAPLCLCA' '0602'.

PERFORM bdc_field USING 'BDC_CURSOR'

'RMCLF-KLART'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=ENTE'.

PERFORM bdc_field USING 'RMCLF-KLART'

'011'.

PERFORM bdc_dynpro USING 'SAPLCLFM' '0500'.

PERFORM bdc_field USING 'BDC_CURSOR'

'RMCLF-CLASS(01)'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=AUSW'.

PERFORM bdc_field USING 'RMCLF-CLASS(01)'

'DETAILRAPPORTER'.

  • Characteristics value

PERFORM bdc_dynpro USING 'SAPLCTMS' '0109'.

PERFORM bdc_field USING 'BDC_CURSOR'

'RCTMS-MWERT(01)'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=BACK'.

PERFORM bdc_field USING 'RCTMS-MNAME(01)'

'DETAILRAPPORTER'.

PERFORM bdc_field USING 'RCTMS-MWERT(01)'

'01'.

PERFORM bdc_field USING 'RCTMS-MNAME(02)'

'DETAILRAPPORTER'.

PERFORM bdc_field USING 'RCTMS-MWERT(02)'

'02'.

PERFORM bdc_field USING 'RCTMS-MNAME(03)'

'DETAILRAPPORTER'.

PERFORM bdc_field USING 'RCTMS-MWERT(03)'

'03'.

PERFORM bdc_field USING 'RCTMS-MNAME(04)'

'DETAILRAPPORTER'.

PERFORM bdc_field USING 'RCTMS-MWERT(04)'

'04'.

PERFORM bdc_field USING 'RCTMS-MNAME(05)'

'DETAILRAPPORTER'.

PERFORM bdc_field USING 'RCTMS-MWERT(05)'

'05'.

PERFORM bdc_field USING 'RCTMS-MNAME(06)'

'DETAILRAPPORTER'.

PERFORM bdc_field USING 'RCTMS-MWERT(06)'

'06'.

PERFORM bdc_field USING 'RCTMS-MNAME(07)'

'DETAILRAPPORTER'.

PERFORM bdc_field USING 'RCTMS-MWERT(07)'

'07'.

PERFORM bdc_field USING 'RCTMS-MNAME(08)'

'DETAILRAPPORTER'.

PERFORM bdc_field USING 'RCTMS-MWERT(08)'

'08'.

PERFORM bdc_field USING 'RCTMS-MNAME(09)'

'DETAILRAPPORTER'.

PERFORM bdc_field USING 'RCTMS-MWERT(09)'

'09'.

PERFORM bdc_dynpro USING 'SAPLCLFM' '0500'.

PERFORM bdc_field USING 'BDC_CURSOR'

'RMCLF-CLASS(01)'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=AUSW'.

PERFORM bdc_dynpro USING 'SAPLCTMS' '0109'.

PERFORM bdc_field USING 'BDC_CURSOR'

'RCTMS-MWERT(01)'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=BACK'.

PERFORM bdc_field USING 'RCTMS-MNAME(01)'

'DETAILRAPPORTER'.

PERFORM bdc_field USING 'RCTMS-MWERT(01)'

'10'.

PERFORM bdc_field USING 'RCTMS-MNAME(02)'

'DETAILRAPPORTER'.

PERFORM bdc_field USING 'RCTMS-MWERT(02)'

'11'.

PERFORM bdc_dynpro USING 'SAPLCLFM' '0500'.

PERFORM bdc_field USING 'BDC_CURSOR'

'RMCLF-CLASS(01)'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=ENDE'.

ENDIF.

PERFORM bdc_dynpro USING 'SAPMF02D' '0320'.

PERFORM bdc_field USING 'BDC_CURSOR'

'KNVV-PERFK'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=UPDA'.

PERFORM bdc_field USING 'KNVV-PERFK'

'AM'.

PERFORM bdc_field USING 'KNVV-KKBER'

'1000'.

PERFORM bdc_transaction TABLES it_msgcol

USING 'XD02'

''

'A'

'S'.

Hope this helps.

Thanks

Swagatika

Read only

0 Likes
2,549

hi,

i don't know the exact ans but

by using <u>set parameterId</u> i think we can do it,

regards,

ganesh

Read only

0 Likes
2,549

Swagatika

I did the same wat u did, but its not working for me, thanks for the help though, when im using the transaction SM35 to run the batch input session, the field RMCLF-CLASS(01) is being displayed as output-only, not as input

Ganesh, what u mean by set parameterid?

Read only

Former Member
0 Likes
2,549

Hi,

Can u Paste Ur Code.

Regards

Ahasan

Read only

0 Likes
2,549

heres the code

DATA : field1(20),

field2(20),

telf1 TYPE kna1-telf1,

adrnr TYPE kna1-adrnr,

ktokd TYPE kna1-ktokd,

wa_extab TYPE ty_tab1,

cname(20) VALUE 'KNVK-NAME1(00)',

banks(20) VALUE 'KNBK-BANKS(00)',

bankn(20) VALUE 'KNBK-BANKN(00)',

bankl(20) VALUE 'KNBK-BANKL(00)'.

DATA : field3(20) VALUE 'RCTMS-MNAME(00)',

field4(20) VALUE 'RCTMS-MWERT(00)',

pos(2) TYPE n VALUE 0.

DATA : head2(10).

DATA : t_smtp TYPE adsmtp OCCURS 0 WITH HEADER LINE.

FIELD-SYMBOLS : <fs1>, <fs2>,

<fs_ablad> TYPE ty_ablad.

CLEAR : bi_open, flags.

  • Fill in work area fields with the appropriate data

LOOP AT t_field ASSIGNING <fs_field>

WHERE value <> 00

AND flagname <> space.

CONCATENATE 'FLAGS' <fs_field>-flagname INTO field1

SEPARATED BY '-'.

ASSIGN (field1) TO <fs1>.

<fs1> = 'X'.

ENDLOOP.

IF flags-d0340 IS INITIAL AND p_unpnt = 'X'.

flags-d0340 = 'X'.

ENDIF.

IF flags-d0310a = 'X' AND flags-d0310 IS INITIAL.

flags-d0310 = 'X'.

ENDIF.

IF flags-d0320t = 'X' AND flags-d0320 IS INITIAL.

flags-d0320 = 'X'.

ENDIF.

IF p_bppy = 'X'.

flags-d0324 = 'X'.

ENDIF.

IF p_kzazu = 'X' AND flags-d0315 IS INITIAL.

flags-d0315 = 'X'.

ENDIF.

LOOP AT intab.

CLEAR: screen_cnt, t_ablad, t_knvp,

t_kssk.

REFRESH : t_ablad, t_knvp.

  • Fill in work area fields with the appropriate data

LOOP AT t_field ASSIGNING <fs_field>

WHERE value <> 00.

CONCATENATE :

  • Destination field

'WA_EXTAB' <fs_field>-sapname INTO field1 SEPARATED BY '-',

  • Source field

'INTAB-FIELD' <fs_field>-value INTO field2.

ASSIGN : (field1) TO <fs1>,

(field2) TO <fs2>.

<fs1> = <fs2>.

ENDLOOP.

  • Pad customer number

IF wa_extab-kunnr CO '0123456789 '.

UNPACK wa_extab-kunnr TO wa_extab-kunnr.

ENDIF.

CLEAR : telf1, adrnr, ktokd.

SELECT SINGLE telf1 adrnr ktokd FROM kna1

INTO (telf1,adrnr,ktokd)

WHERE kunnr = wa_extab-kunnr.

  • Check customer exists

IF sy-subrc <> 0.

MOVE : wa_extab-kunnr TO wa_errtab-kunnr,

text-001 TO wa_errtab-message.

INSERT wa_errtab INTO TABLE errtab. CLEAR wa_errtab.

CONTINUE.

ENDIF.

  • DPZ01

  • Check customer exists in sales area

SELECT SINGLE kunnr FROM knvv

INTO knvv-kunnr

WHERE kunnr = wa_extab-kunnr

AND vkorg = wa_extab-vkorg

AND vtweg = wa_extab-vtweg

AND spart = wa_extab-spart.

IF sy-subrc <> 0.

MOVE : wa_extab-kunnr TO wa_errtab-kunnr,

text-010 TO wa_errtab-message.

REPLACE : '&1' WITH wa_extab-vkorg INTO wa_errtab-message,

'&2' WITH wa_extab-vtweg INTO wa_errtab-message,

'&3' WITH wa_extab-spart INTO wa_errtab-message.

CONDENSE wa_errtab-message.

INSERT wa_errtab INTO TABLE errtab. CLEAR wa_errtab.

CONTINUE.

ENDIF.

  • DPZ01

  • Screens for the customer

PERFORM select_screens USING ktokd

CHANGING i_flags screens.

IF telf1 IS INITIAL.

wa_extab-sw_tel = 'X'.

ENDIF.

  • Number of contacts

SELECT COUNT( * ) FROM knvk INTO wa_extab-contact

WHERE kunnr = wa_extab-kunnr.

  • Number of bank accounts

SELECT COUNT( * ) FROM knbk INTO wa_extab-account

WHERE kunnr = wa_extab-kunnr.

IF p_unpnt = 'X'.

  • List of unloading points

SELECT ablad FROM knva APPENDING TABLE t_ablad

WHERE kunnr = wa_extab-kunnr.

  • UP exists in UP view ?

READ TABLE t_ablad WITH TABLE KEY ablad = c_up

ASSIGNING <fs_ablad>.

IF sy-subrc <> 0.

MOVE : wa_extab-kunnr TO wa_errtab-kunnr,

text-002 TO wa_errtab-message.

INSERT wa_errtab INTO TABLE errtab. CLEAR wa_errtab.

ENDIF.

ENDIF.

  • Class assigned to customer

IF NOT p_elevl1 IS INITIAL OR NOT p_elevl2 IS INITIAL OR

NOT p_elevl3 IS INITIAL OR NOT p_esfid IS INITIAL OR

NOT p_ehead IS INITIAL OR NOT p_etelcm IS INITIAL OR

*PCT

NOT p_ctype IS INITIAL OR

NOT p_eool IS INITIAL.

MOVE wa_extab-kunnr TO objek.

SELECT clint zaehl INTO CORRESPONDING FIELDS OF TABLE t_kssk

FROM kssk

WHERE objek = objek

AND klart = c_klart.

ENDIF.

  • BATCH INPUT

IF bi_open IS INITIAL.

PERFORM open_ses USING session_name.

bi_open = 'X'.

ENDIF.

  • First screen

  • DPZ01

  • PERFORM first_screen USING wa_extab-kunnr i_flags.

PERFORM first_screen USING wa_extab-kunnr wa_extab-vkorg

wa_extab-vtweg wa_extab-spart i_flags.

  • DPZ01

  • Address

IF i_flags-d0110 = 'X'.

PERFORM choose_okcode USING screens

CHANGING screen_cnt okcode.

PERFORM loadibatch USING : 'X' 'SAPMF02D' '111'.

fill_field : wa_extab-name1 'ADDR1_DATA-NAME1',

wa_extab-stras 'ADDR1_DATA-STREET',

wa_extab-pstlz 'ADDR1_DATA-POST_CODE1',

wa_extab-ort01 'ADDR1_DATA-CITY1',

wa_extab-land1 'ADDR1_DATA-COUNTRY',

wa_extab-spras 'ADDR1_DATA-LANGU',

wa_extab-telfx 'SZA1_D0100-FAX_NUMBER'.

  • Telephone number

IF NOT wa_extab-telf1 IS INITIAL.

IF wa_extab-sw_tel = 'X'.

  • No tel.nbr -> can put it in current screen

PERFORM loadibatch USING

' ' 'SZA1_D0100-TEL_NUMBER' wa_extab-telf1.

ELSE.

  • A tel.nbr exists -> add the new one

PERFORM loadibatch USING :

' ' 'BDC_OKCODE' '=$MTE',

'X' 'SAPLSZA6' '0200',

' ' 'BDC_OKCODE' 'NEWL',

'X' 'SAPLSZA6' '0200',

' ' 'ADTEL-TEL_NUMBER(01)' wa_extab-telf1,

' ' 'BDC_OKCODE' 'CONT',

'X' 'SAPMF02D' '0111'.

ENDIF.

ENDIF.

  • E-mail

IF NOT wa_extab-email IS INITIAL.

IF wa_extab-sw_mail = 'X'.

  • No e-mail -> can put it in current screen

PERFORM loadibatch USING

' ' 'SZA1_D0100-SMTP_ADDR' wa_extab-email.

ELSE.

  • An e-mail exists -> add the new one

PERFORM loadibatch USING :

' ' 'BDC_OKCODE' '=$INT',

'X' 'SAPLSZA6' '0600',

' ' 'BDC_OKCODE' 'NEWL',

'X' 'SAPLSZA6' '0600',

' ' 'ADSMTP-SMTP_ADDR(01)' wa_extab-email,

' ' 'BDC_OKCODE' 'CONT',

'X' 'SAPMF02D' '0111'.

ENDIF.

ENDIF.

IF NOT p_elevl1 IS INITIAL OR NOT p_elevl2 IS INITIAL OR

NOT p_elevl3 IS INITIAL OR NOT p_esfid IS INITIAL OR

NOT p_ehead IS INITIAL OR NOT p_etelcm IS INITIAL OR

*PCT

NOT p_ctype IS INITIAL OR

*PCT

NOT p_eool IS INITIAL.

CLEAR pos.

PERFORM loadibatch USING : ' ' 'BDC_OKCODE' 'KLAS',

'X' 'SAPLCLCA' '0602',

' ' 'RMCLF-KLART' c_klart,

' ' 'BDC_OKCODE' 'ENTE',

'X' 'SAPLCLFM' '0500'.

IF t_kssk[] IS INITIAL.

PERFORM create_new_class. "Create the first assignment

ELSE.

READ TABLE t_kssk WITH KEY clint = clint

ASSIGNING <kssk>.

IF sy-subrc = 0.

PERFORM change_class USING sy-tabix. "Change existing class

ELSE.

PERFORM create_add_class. "Add an assignment

ENDIF.

ENDIF.

IF NOT wa_extab-levl1 IS INITIAL.

ADD 1 TO pos.

field312(2) = field412(2) = pos.

PERFORM loadibatch USING : ' ' field3 c_level1,

' ' field4 wa_extab-levl1.

ENDIF.

IF NOT wa_extab-levl2 IS INITIAL.

ADD 1 TO pos.

field312(2) = field412(2) = pos.

PERFORM loadibatch USING : ' ' field3 c_level2,

' ' field4 wa_extab-levl2.

ENDIF.

IF NOT wa_extab-levl3 IS INITIAL.

ADD 1 TO pos.

field312(2) = field412(2) = pos.

PERFORM loadibatch USING : ' ' field3 c_level3,

' ' field4 wa_extab-levl3.

ENDIF.

IF NOT wa_extab-sfid IS INITIAL.

ADD 1 TO pos.

field312(2) = field412(2) = pos.

PERFORM loadibatch USING : ' ' field3 c_sfid,

' ' field4 wa_extab-sfid.

ENDIF.

IF NOT wa_extab-head IS INITIAL.

ADD 1 TO pos.

field312(2) = field412(2) = pos.

WRITE wa_extab-head TO head2 NO-ZERO.

PERFORM loadibatch USING : ' ' field3 c_head,

' ' field4 head2.

ENDIF.

IF NOT wa_extab-telecm IS INITIAL.

ADD 1 TO pos.

field312(2) = field412(2) = pos.

PERFORM loadibatch USING : ' ' field3 c_telecom,

' ' field4 wa_extab-telecm.

ENDIF.

IF NOT wa_extab-ool IS INITIAL.

ADD 1 TO pos.

field312(2) = field412(2) = pos.

PERFORM loadibatch USING : ' ' field3 c_ool,

' ' field4 wa_extab-ool.

ENDIF.

*PCT

IF NOT wa_extab-ctype IS INITIAL.

ADD 1 TO pos.

field312(2) = field412(2) = pos.

PERFORM loadibatch USING : ' ' field3 c_contract,

' ' field4 wa_extab-ctype.

ENDIF.

*PCT

PERFORM loadibatch USING : ' ' 'BDC_OKCODE' 'BACK',

'X' 'SAPLCLFM' '0500',

' ' 'BDC_OKCODE' 'ENDE',

'X' 'SAPMF02D' '0111'.

ENDIF.

PERFORM loadibatch USING ' ' 'BDC_OKCODE' okcode.

ENDIF.

PERFORM insert_ses USING 'XD02'.

FORM loadibatch USING start fname fvalue.

CLEAR ibatch.

IF start = 'X'.

ibatch-program = fname.

ibatch-dynpro = fvalue.

ELSE.

ibatch-fnam = fname.

ibatch-fval = fvalue.

ENDIF.

ibatch-dynbegin = start.

APPEND ibatch.

ENDFORM.

FORM create_new_class.

CONCATENATE 'RMCLF-CLASS(' '01)' INTO rmclf_class1.

PERFORM loadibatch USING:

' ' 'BDC_CURSOR' 'RMCLF-CLASS(01)',

' ' 'BDC_OKCODE' '=AUSW',

' ' 'RMCLF-CLASS(01)' c_class,

'X' 'SAPLCTMS' '0109'.

  • PERFORM loadibatch USING :

  • ' ' 'RMCLF-CLASS(01)' c_class,

*

  • ' ' 'BDC_OKCODE' '/00',

  • 'X' 'SAPLCTMS' '0109'.

ENDFORM. " create_new_class

&----


*& Form create_add_class

&----


  • Create a new assignment

----


FORM create_add_class.

PERFORM loadibatch USING : ' ' 'BDC_OKCODE' 'NEUZ',

'X' 'SAPLCLFM' '0500',

' ' 'RMCLF-CLASS(02)' c_class,

' ' 'BDC_OKCODE' '/00',

'X' 'SAPLCTMS' '0109'.

ENDFORM. " create_add_class

&----


*& Form change_class

&----


  • Change an existing assignment

----


  • -->PAGPOS Position of the class

----


FORM change_class USING pagpos TYPE sy-tabix.

DATA : pagpos2(2) TYPE n,

field(20) VALUE 'RMCLF-KREUZ(00)'.

MOVE pagpos TO pagpos2.

REPLACE '00' WITH pagpos2 INTO field.

CONDENSE field NO-GAPS.

PERFORM loadibatch USING : ' ' field 'X',

' ' 'BDC_OKCODE' 'AUSW',

'X' 'SAPLCTMS' '0109'.

ENDFORM. " change_class

Read only

Former Member
0 Likes
2,549

hi

by using the syntax SET PARAMETER ID '<param id>' to <field>.

we can get the parameter id from the dictionary table and here the field means from where we want to put the data in the data field,

we done the code for the transaction on material. i will give the same code what we done to ur mail, give me ur mail id.

regards,

ganesh

Read only

0 Likes
2,549

its bb_anjali@hotmail.com

By the way, does anybody know in which table are the core characteristics of a customer stored?

Regards