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

No changes getting updated in table LFA1

Former Member
0 Likes
1,951

I have recorded transaction XK02. when I run the BDC program

ZLFA1_UP_C, I don’t get any error message & it also shows

message ‘Changes have been made’ the data is updated. Its for vendor mobile nos. upload.

But when I check TELF2 field in the table LFA1 no changes are updated.

I am unable to trace the problem. Kindly guide me on the same.

The BDC program is as follows :

REPORT ZLFA1_UP_C no standard page heading line-size 255 .

DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.

DATA : BEGIN OF itab OCCURS 0,

lifnr like lfa1-lifnr,

telf2 like lfa1-telf2,

END OF itab.

start-of-selection.

CALL FUNCTION 'UPLOAD'

EXPORTING

  • CODEPAGE = ' '

FILENAME = 'c:\ '

FILETYPE = 'ASC'

TABLES

data_tab = itab

  • EXCEPTIONS

  • CONVERSION_ERROR = 1

  • INVALID_TABLE_WIDTH = 2

  • INVALID_TYPE = 3

  • NO_BATCH = 4

  • UNKNOWN_ERROR = 5

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

loop at itab.

REFRESH BDCDATA.

perform bdc_dynpro using 'SAPMF02K' '0101'.

perform bdc_field using 'BDC_CURSOR'

'RF02K-D0110'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'RF02K-LIFNR'

  • '7911014'.

itab-lifnr.

perform bdc_field using 'RF02K-BUKRS'

'cg'.

perform bdc_field using 'RF02K-EKORG'

'lapo'.

perform bdc_field using 'RF02K-D0110'

'X'.

perform bdc_dynpro using 'SAPMF02K' '0110'.

perform bdc_field using 'BDC_CURSOR'

'LFA1-ANRED'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

*perform bdc_field using 'LFA1-ANRED'

  • 'Company'.

*perform bdc_field using 'LFA1-NAME1'

  • 'SKF BEARINGS INDIA LTD'.

*perform bdc_field using 'LFA1-SORTL'

  • 'SKF'.

*perform bdc_field using 'LFA1-NAME2'

  • '"CHINCHWAD,NEAR CHAPHEKAR STATUE"'.

*perform bdc_field using 'LFA1-NAME3'

  • 'ATTN MR ABHIJIT KULKARNI'.

*perform bdc_field using 'LFA1-ORT01'

  • 'PUNE'.

*perform bdc_field using 'LFA1-PSTLZ'

  • '411033'.

*perform bdc_field using 'LFA1-LAND1'

  • 'IN'.

*perform bdc_field using 'LFA1-REGIO'

  • '13'.

*perform bdc_field using 'LFA1-SPRAS'

  • 'EN'.

*perform bdc_field using 'LFA1-TELF1'

  • '020-4112428'.

perform bdc_field using 'LFA1-TELF2'

  • '9322855166'.

itab-telf2.

Call Transaction 'XK02' using BDCDATA Mode 'A' .

*Refresh BDCDATA.

Endloop.

*perform close_group.

----


  • Start new screen *

----


FORM BDC_DYNPRO USING PROGRAM DYNPRO.

CLEAR BDCDATA.

BDCDATA-PROGRAM = PROGRAM.

BDCDATA-DYNPRO = DYNPRO.

BDCDATA-DYNBEGIN = 'X'.

APPEND BDCDATA.

ENDFORM.

----


  • Insert field *

----


FORM BDC_FIELD USING FNAM FVAL.

  • IF FVAL <> NODATA.

CLEAR BDCDATA.

BDCDATA-FNAM = FNAM.

BDCDATA-FVAL = FVAL.

APPEND BDCDATA.

  • ENDIF.

ENDFORM.

Plz help.

3 REPLIES 3
Read only

Former Member
0 Likes
1,115

hi,

check itab after uploading.

check bdcdata before call transaction.

if both are perfect check these tabls 2 LFB1 and LFM1

Read only

Former Member
0 Likes
1,115

Hi,

in u r case u r uploading data into internal table but u r not using that internal table field to upload data

ie perform bdc_field using 'LFA1-TELF2'

'9322855166'.

instead of above use:-

perform bdc_field using 'LFA1-TELF2'

itab-telf2.

and check is telephone number is 10 digits or more.

if more u need to append leading zeros to u r telephone number like conversion_exit_mat1_input to the field itab-telf2

and then pass to u r perform perform bdc_field using 'LFA1-TELF2' itab-telf2.

Read only

0 Likes
1,115

hi

i have used ITAB-TELF2 only. Please see in the pgm again.

kindly help now.