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

Loading bulk data into any infotypes

Former Member
0 Likes
1,448

Hi all,

I need a program that can load thousands of data into any infotypes reading from a text file or excel spreadsheet.

Here the infotypes is generic(ie., they haven't mentioned any specific infotypes).

Can anyone help me out in this, is there any demo program or any other examples based on this requirement.

Thanks in advance,

Vishnu

10 REPLIES 10
Read only

Former Member
0 Likes
1,405

Try to use the function module HR_MAINTAIN_MASTERDATA to upload data in infotypes.

Read only

0 Likes
1,405

Is there any demo programs for this.............

Read only

GauthamV
Active Contributor
0 Likes
1,405

Use these FM.

HR_INFOTYPE_OPERATION

HR_MAINTAIN_MASTERDATA

Read only

Former Member
0 Likes
1,405

Is there any demo programs for this.............

Read only

Former Member
0 Likes
1,405

Is there any demo programs for this.............

Read only

Former Member
0 Likes
1,405

Is there any demo programs for this.............

Read only

Former Member
0 Likes
1,405

Do a where used for the function module HR_MAINTAIN_MASTERDATA and you will get some standard programs which use this function module.

You can check out the program RPLAPL00.

Read only

Former Member
0 Likes
1,405

Hi,

Use the FM to upload the xcel.

  • FM call to upload file

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = gv_file

filetype = lv_filetype

has_field_separator = lv_field_sep

TABLES

data_tab = gi_datatab.

Then use BDC recording to update infotypes:

  • Infotype 0000

CLEAR wa_bdcdata.

wa_bdcdata-program = 'SAPMP50A'.

wa_bdcdata-dynpro = '1300'.

wa_bdcdata-dynbegin = 'X'.

APPEND wa_bdcdata TO gi_bdcdata.

CLEAR wa_bdcdata.

wa_bdcdata-fnam = 'BDC_OKCODE'.

wa_bdcdata-fval = '=INS'.

APPEND wa_bdcdata TO gi_bdcdata.

CLEAR wa_bdcdata.

wa_bdcdata-fnam = 'RP50G-PERNR'.

wa_bdcdata-fval = gv_pernr.

APPEND wa_bdcdata TO gi_bdcdata.

CLEAR wa_bdcdata.

wa_bdcdata-fnam = 'RP50G-TIMR6'.

wa_bdcdata-fval = 'X'.

APPEND wa_bdcdata TO gi_bdcdata.

CLEAR wa_bdcdata.

wa_bdcdata-fnam = 'BDC_CURSOR'.

wa_bdcdata-fval = 'RP50G-SUBTY'.

APPEND wa_bdcdata TO gi_bdcdata.

CLEAR wa_bdcdata.

wa_bdcdata-fnam = 'RP50G-CHOIC'.

wa_bdcdata-fval = '0'.

APPEND wa_bdcdata TO gi_bdcdata.

CLEAR wa_bdcdata.

wa_bdcdata-fnam = 'RP50G-SUBTY'.

wa_bdcdata-fval = wa_datatab-massn.

APPEND wa_bdcdata TO gi_bdcdata.

CLEAR wa_bdcdata.

wa_bdcdata-program = 'MP000000'.

wa_bdcdata-dynpro = '2000'.

wa_bdcdata-dynbegin = 'X'.

APPEND wa_bdcdata TO gi_bdcdata.

CLEAR wa_bdcdata.

wa_bdcdata-fnam = 'BDC_CURSOR'.

wa_bdcdata-fval = 'P0000-MASSG'.

APPEND wa_bdcdata TO gi_bdcdata.

CLEAR wa_bdcdata.

wa_bdcdata-fnam = 'BDC_OKCODE'.

wa_bdcdata-fval = '=UPD'.

APPEND wa_bdcdata TO gi_bdcdata.

CLEAR wa_bdcdata.

wa_bdcdata-fnam = 'P0000-BEGDA'.

wa_bdcdata-fval = gv_begda.

APPEND wa_bdcdata TO gi_bdcdata.

CLEAR wa_bdcdata.

wa_bdcdata-fnam = 'P0000-MASSG'.

wa_bdcdata-fval = wa_datatab-massg.

APPEND wa_bdcdata TO gi_bdcdata.

CLEAR wa_bdcdata.

Hope it helps.

Regards,

Rajesh Kumar

Read only

0 Likes
1,405

Hi rajesh thanks for your post it looks good......... but instead of BDC is there any other way like BAPI, LSMW....... bcos BDC will be dependent on screens right so once if they upgrade it will become problem and another problem is we dont know the infotypes and fields for that.

thanks.....

Edited by: Vishnu Ramanathan on Oct 21, 2009 11:31 AM

Read only

0 Likes
1,405

Hi,

Then use FM HR_MAINTAIN_MASTERDATA.

CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'

EXPORTING

pernr = lv_pernr

actio = 'MOD'

tclas = lc_tclas "'A'

begda = wa_p0105-begda

endda = wa_p0105-endda "'99991231'

dialog_mode = lc_mode "'0'

luw_mode = '0'

IMPORTING

return = rc

return1 = rc1

TABLES

proposed_values = proposed_values0105_2.

  • Rollback work

IF ( rc-type EQ 'E' OR rc1-type EQ 'E').

gv_success = 'N' .

ROLLBACK WORK.

ENDIF.

        • Infotye 0105

lv_fval = lc_0010 . "'0010' " subtype

wa_proposed_values-infty = lc_0105.

wa_proposed_values-fname = lc_0105subty.

wa_proposed_values-fval = lv_fval.

wa_proposed_values-seqnr = lc_seqnr.

APPEND wa_proposed_values TO proposed_values0105.

CLEAR lv_fval.

CLEAR wa_proposed_values.

lv_fval = wa_source_data-usrid.

wa_proposed_values-infty = lc_0105.

wa_proposed_values-fname = lc_0105mailid.

wa_proposed_values-fval = lv_fval.

wa_proposed_values-seqnr = lc_seqnr.

APPEND wa_proposed_values TO proposed_values0105.

CLEAR lv_fval.

CLEAR wa_proposed_values.

Regards,

Rajesh Kumar

Edited by: Rajesh Kumar on Oct 21, 2009 8:19 AM