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

uploading data

Former Member
0 Likes
964

Dear All,

I have one issue. We have 200 records of data in excel sheet like Purchase orders, materials and other ones.

So, for particular purchase order and material, I need to check one check box. This should be done automatically.

Based on the data in excel sheet, I need to check the check box in me23n transaction.

Kindly send me some code for this.

Thanku all,

CR

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
934

Hi,

If MEPO1313-WEPOS is the field ,

while populating the BDC for this pass value 'X' for

this.

PERFORM pop_bdc USING: ' ' 'MEPO1313-WEPOS' 'X'.

FORM pop_bdc USING p_a TYPE any

p_b TYPE any

p_c TYPE any.

IF p_a EQ c_x.

i_bdcdata-program = p_b.

i_bdcdata-dynpro = p_c.

i_bdcdata-dynbegin = p_a.

ELSE.

i_bdcdata-fnam = p_b.

i_bdcdata-fval = p_c.

ENDIF.

APPEND i_bdcdata.

CLEAR i_bdcdata.

ENDFORM. " pop_bdc

Regards,

GSR.

8 REPLIES 8
Read only

Former Member
0 Likes
934

HI kc,

1. that field value (for check box)

should have

'X'

as value.

regards,

amit m.

Read only

0 Likes
934

Hi,

Shall I need to use BDC for this, right? If so, please send me some example code.

Thanku,

CR

Read only

Former Member
0 Likes
934

Hi,

The value of the checkbox in me23n will be reflected from some database table.

Upload the data using GUI_UPLOAD.

If (your condition for purchase order and material).

update the flag in proper table.

Endif.

Regards,

Tanveer.

Mark helpful answers

Read only

Former Member
0 Likes
935

Hi,

If MEPO1313-WEPOS is the field ,

while populating the BDC for this pass value 'X' for

this.

PERFORM pop_bdc USING: ' ' 'MEPO1313-WEPOS' 'X'.

FORM pop_bdc USING p_a TYPE any

p_b TYPE any

p_c TYPE any.

IF p_a EQ c_x.

i_bdcdata-program = p_b.

i_bdcdata-dynpro = p_c.

i_bdcdata-dynbegin = p_a.

ELSE.

i_bdcdata-fnam = p_b.

i_bdcdata-fval = p_c.

ENDIF.

APPEND i_bdcdata.

CLEAR i_bdcdata.

ENDFORM. " pop_bdc

Regards,

GSR.

Read only

0 Likes
934

Dear All,

Thanks for the replies.

If you could send total code for uploading 200 records from excel file(from my local system), it would be great help to me.

Thanks,

CR

Read only

0 Likes
934

Hi,

Use 'GUI_UPLOAD' to upload the data

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME = FILE_NAME

FILETYPE = 'ASC'

TABLES

DATA_TAB = IT_OUTPUT

EXCEPTIONS

OTHERS = 1.

where file_name will be the name of the file on the

PC and IT_OUTPUT is the internal table which will be

populated after the call to FM 'GUI_UPLOAD'

Regards,

GSR.

Read only

Former Member
0 Likes
934

Hi kc,

1. BAPI_PO_CREATE1

This BAPI/FM

is generally used for uploading purchase orders.

(as compared to the technique of BDC)

2. Similary, u can go for another bapi for

material master.

regards,

amit m.

Read only

0 Likes
934

Dear Amit,

Since the check box that I need check is in items of Purchase order details, I can't use BDC to check that check box, right? Kindly clarify me.

Thanks,

CR