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

BDC Program For 585 Infotype

Former Member
0 Likes
783

Dear Friends,

Is anybody having the program for uploading 586 infotype using BDC(Actual contirbutions). Pl help.

Regards

Elini.P

4 REPLIES 4
Read only

christian_wohlfahrt
Active Contributor
0 Likes
558

Hi Elini!

Normally infotypes are based on documents. As long as they are still in the system (not archived), you can rebuild an infotype with some SAP-reports.

Have a look into the customizing ...Data Basis / Tools / Setup of Statistical Data / Application-Specific Setup of Statistical Data. The documentation behind 'Setup of Statistical Data' is quite good and describes necessary steps for a new data creation.

Regards,

Christian

Read only

Former Member
0 Likes
558

hey ELini.

R u SRM MCA2000 batch elini--TVS?

sorry.let me know.

chandra

Read only

Former Member
0 Likes
558

Hi Eline,

i done BDc for 586 and 585 ,still u have any Issues plz send a query.My will try to help U. And i have one more qurey.

regards

Prabhu

nethranp@hotmail.com

Read only

Former Member
0 Likes
558

Hi,

U can try this one. Hope That will be of any help.

REPORT ZHR0586

NO STANDARD PAGE HEADING LINE-SIZE 255.

INCLUDE BDCRECX1.

      • DO NOT CHANGE - the generated data section - DO NOT CHANGE ***

*

  • If it is nessesary to change the data section use the rules:

  • 1.) Each definition of a field exists of two lines

  • 2.) The first line shows exactly the comment

  • '* data element: ' followed with the data element

  • which describes the field.

  • If you don't have a data element use the

  • comment without a data element name

  • 3.) The second line shows the fieldname of the

  • structure, the fieldname must consist of

  • a fieldname and optional the character '_' and

  • three numbers and the field length in brackets

  • 4.) Each field must be type C.

*

      • Generated data section with specific formatting - DO NOT CHANGE ***

DATA: BEGIN OF RECORD OCCURS 0,

  • data element: PERNR_D

PERNR_001(038),

  • data element: PIN_PINVT

PINVT_01(012),

  • data element: PIN_PINVT

PINVT_02(012),

  • data element: PIN_PINVT

PINVT_03(012),

  • data element: PIN_PINVT

PINVT_04(012),

  • data element: PIN_PINVT

PINVT_05(012),

  • data element: PIN_PINVT

PINVT_06(012),

  • data element: PIN_PINVT

PINVT_07(012),

  • data element: PIN_PINVT

PINVT_08(012),

  • data element: PIN_PINVT

PINVT_09(012),

  • data element: PIN_PINVT

PINVT_10(012),

  • data element: PIN_PINVT

PINVT_11(012),

  • data element: PIN_PINVT

PINVT_12(012),

  • data element: PIN_PINVT

PINVT_13(012),

  • data element: PIN_PINVT

PINVT_14(012),

  • data element: PIN_PINVT

PINVT_15(012),

  • data element: PIN_PINVT

PINVT_16(012),

  • data element: PIN_PINVT

PINVT_17(012),

  • data element: PIN_PINVT

PINVT_18(012),

  • data element: PIN_PINVT

PINVT_19(012),

  • data element: PIN_PINVT

PINVT_20(012),

  • data element: PIN_PINVT

PINVT_21(012),

  • data element: PIN_AINVT

AINVT_01(012),

  • data element: PIN_AINVT

AINVT_02(012),

  • data element: PIN_AINVT

AINVT_03(012),

  • data element: PIN_AINVT

AINVT_04(012),

  • data element: PIN_AINVT

AINVT_05(012),

  • data element: PIN_AINVT

AINVT_06(012),

  • data element: PIN_AINVT

AINVT_07(012),

  • data element: PIN_AINVT

AINVT_08(012),

  • data element: PIN_AINVT

AINVT_09(012),

  • data element: PIN_AINVT

AINVT_10(012),

  • data element: PIN_AINVT

AINVT_11(012),

  • data element: PIN_AINVT

AINVT_12(012),

  • data element: PIN_AINVT

AINVT_13(012),

  • data element: PIN_AINVT

AINVT_14(012),

  • data element: PIN_AINVT

AINVT_15(012),

  • data element: PIN_AINVT

AINVT_16(012),

  • data element: PIN_AINVT

AINVT_17(012),

  • data element: PIN_AINVT

AINVT_18(012),

  • data element: PIN_AINVT

AINVT_19(012),

  • data element: PIN_AINVT

AINVT_20(012),

  • data element: PIN_AINVT

AINVT_21(012),

END OF RECORD.

      • End generated data section ***

START-OF-SELECTION.

CALL FUNCTION 'UPLOAD'

  • EXPORTING

  • CODEPAGE = ' '

  • FILENAME = ' '

  • FILETYPE = ' '

  • ITEM = ' '

  • FILEMASK_MASK = ' '

  • FILEMASK_TEXT = ' '

  • FILETYPE_NO_CHANGE = ' '

  • FILEMASK_ALL = ' '

  • FILETYPE_NO_SHOW = ' '

  • LINE_EXIT = ' '

  • USER_FORM = ' '

  • USER_PROG = ' '

  • SILENT = 'S'

  • IMPORTING

  • FILESIZE =

  • CANCEL =

  • ACT_FILENAME =

  • ACT_FILETYPE =

TABLES

DATA_TAB = RECORD

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

PERFORM OPEN_GROUP.

LOOP AT RECORD.

PERFORM BDC_DYNPRO USING 'SAPMP50A' '1000'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'/00'.

PERFORM BDC_FIELD USING 'RP50G-PERNR'

RECORD-PERNR_001.

PERFORM BDC_FIELD USING 'BDC_CURSOR'

'RP50G-CHOIC'.

PERFORM BDC_FIELD USING 'RP50G-CHOIC'

'0586'.

PERFORM BDC_DYNPRO USING 'SAPMP50A' '1000'.

PERFORM BDC_FIELD USING 'BDC_CURSOR'

'RP50G-PERNR'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=INS'.

PERFORM BDC_DYNPRO USING 'MP058600' '2000'.

PERFORM BDC_FIELD USING 'BDC_CURSOR'

'Q0586-AINVT(07)'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'/00'.

PERFORM BDC_FIELD USING 'Q0586-PINVT(01)'

RECORD-PINVT_01.

PERFORM BDC_FIELD USING 'Q0586-AINVT(01)'

RECORD-AINVT_01.

PERFORM BDC_FIELD USING 'Q0586-PINVT(02)'

RECORD-PINVT_02.

PERFORM BDC_FIELD USING 'Q0586-AINVT(02)'

RECORD-AINVT_02.

PERFORM BDC_FIELD USING 'Q0586-PINVT(03)'

RECORD-PINVT_03.

PERFORM BDC_FIELD USING 'Q0586-AINVT(03)'

RECORD-AINVT_03.

PERFORM BDC_FIELD USING 'Q0586-PINVT(04)'

RECORD-PINVT_04.

PERFORM BDC_FIELD USING 'Q0586-AINVT(04)'

RECORD-AINVT_04.

PERFORM BDC_FIELD USING 'Q0586-PINVT(05)'

RECORD-PINVT_05.

PERFORM BDC_FIELD USING 'Q0586-AINVT(05)'

RECORD-AINVT_05.

PERFORM BDC_FIELD USING 'Q0586-PINVT(06)'

RECORD-PINVT_06.

PERFORM BDC_FIELD USING 'Q0586-AINVT(06)'

RECORD-AINVT_06.

PERFORM BDC_FIELD USING 'Q0586-PINVT(07)'

RECORD-PINVT_07.

PERFORM BDC_FIELD USING 'Q0586-AINVT(07)'

RECORD-AINVT_07.

PERFORM BDC_FIELD USING 'Q0586-PINVT(08)'

RECORD-PINVT_08.

PERFORM BDC_FIELD USING 'Q0586-AINVT(08)'

RECORD-AINVT_08.

PERFORM BDC_FIELD USING 'Q0586-PINVT(09)'

RECORD-PINVT_09.

PERFORM BDC_FIELD USING 'Q0586-AINVT(09)'

RECORD-AINVT_09.

PERFORM BDC_FIELD USING 'Q0586-PINVT(10)'

RECORD-PINVT_10.

PERFORM BDC_FIELD USING 'Q0586-AINVT(10)'

RECORD-AINVT_10.

PERFORM BDC_FIELD USING 'Q0586-PINVT(11)'

RECORD-PINVT_11.

PERFORM BDC_FIELD USING 'Q0586-AINVT(11)'

RECORD-AINVT_11.

PERFORM BDC_FIELD USING 'Q0586-PINVT(12)'

RECORD-PINVT_12.

PERFORM BDC_FIELD USING 'Q0586-AINVT(12)'

RECORD-AINVT_12.

PERFORM BDC_DYNPRO USING 'MP058600' '2000'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=P++'.

PERFORM BDC_DYNPRO USING 'MP058600' '2000'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=P+'.

PERFORM BDC_FIELD USING 'Q0586-PINVT(04)'

RECORD-PINVT_13.

PERFORM BDC_FIELD USING 'Q0586-AINVT(04)'

RECORD-AINVT_13.

PERFORM BDC_FIELD USING 'Q0586-PINVT(05)'

RECORD-PINVT_14.

PERFORM BDC_FIELD USING 'Q0586-AINVT(05)'

RECORD-AINVT_14.

PERFORM BDC_FIELD USING 'Q0586-PINVT(06)'

RECORD-PINVT_15.

PERFORM BDC_FIELD USING 'Q0586-AINVT(06)'

RECORD-AINVT_15.

PERFORM BDC_FIELD USING 'Q0586-PINVT(07)'

RECORD-PINVT_16.

PERFORM BDC_FIELD USING 'Q0586-AINVT(07)'

RECORD-AINVT_16.

PERFORM BDC_FIELD USING 'Q0586-PINVT(08)'

RECORD-PINVT_17.

PERFORM BDC_FIELD USING 'Q0586-AINVT(08)'

RECORD-AINVT_17.

PERFORM BDC_FIELD USING 'Q0586-PINVT(09)'

RECORD-PINVT_18.

PERFORM BDC_FIELD USING 'Q0586-AINVT(09)'

RECORD-AINVT_18.

PERFORM BDC_FIELD USING 'Q0586-PINVT(10)'

RECORD-PINVT_19.

PERFORM BDC_FIELD USING 'Q0586-AINVT(10)'

RECORD-AINVT_19.

PERFORM BDC_FIELD USING 'Q0586-PINVT(11)'

RECORD-PINVT_20.

PERFORM BDC_FIELD USING 'Q0586-AINVT(11)'

RECORD-AINVT_20.

PERFORM BDC_FIELD USING 'Q0586-PINVT(12)'

RECORD-PINVT_21.

PERFORM BDC_FIELD USING 'Q0586-AINVT(12)'

RECORD-AINVT_21.

PERFORM BDC_DYNPRO USING 'MP058600' '2000'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=UPD'.

PERFORM BDC_TRANSACTION USING 'PA30'.

ENDLOOP.

PERFORM CLOSE_GROUP.