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

Problem with BAPI

Former Member
0 Likes
712

Hi,

All,

I am using bapi ' BAPI_QPGR_SAVEREPLICA' in t-code QSS41 PM module for Profile Catalog. when i am uploading excel file then i am getting error in return parameter (1)- 'ENTER CODE GROUP(S), in message coloumn and (2)- Do not use the character * for the key *. please give me solution.

Thanks,

Regards,

Saurabh

4 REPLIES 4
Read only

Former Member
0 Likes
654

Hi,

I hope when you uploda the excel file data into SAP and that data you are passing to BAPI.

When you pass the data into BAPI Structurs you need to fill the values for code_grp those value should be present

in the excel file data. So that is reaon it shows error and ask you fill the data. Please check and come back for the assitance.

Read only

0 Likes
654

Hi,

Sir

i have been changed excel data . but i am getting same problem.

thanks,

Regards,

Saurabh

Read only

0 Likes
654

Hi,

in the BAPI there is importing structure in that exits a CODE_GROUP field. have you filled this field with values when you pass the bapi. if you filled group field and also other parameters also exits in the structure. Try to fill this filed also

FUNCTION

CAT_TYPE

CODE_GROUP

and then you might be filling the Tables structure also in the BAPI right?. Please check and let me know.

Read only

0 Likes
654

Hi,

I have been filled. i am pasting my coding please check below.

LOOP AT ITAB INTO WA_ITAB.

LS_BAPIQPGR_QPGR-CAT_TYPE = WA_ITAB-KATALOGART .

LS_BAPIQPGR_QPGR-CODE_GROUP = WA_ITAB-CODEGRUPPE.

LS_BAPIQPGR_QPGR-CREATED_BY_USER = SY-UNAME.

LS_BAPIQPGR_QPGR-CREATED_ON_DATE = SY-DATUM.

LS_BAPIQPGR_QPGR-STATUS = WA_ITAB-STATUS.

*LOOP AT ITAB INTO WA_ITAB.

WA_BAPIQPGR_QPGT-LANGU = 'EN'.

WA_BAPIQPGR_QPGT-SHORT_TEXT = WA_ITAB-KURZTEXT.

APPEND WA_BAPIQPGR_QPGT TO LT_BAPIQPGR_QPGT.

WA_BAPIQPGR_QPCD-CODE = WA_ITAB-CODEGRUPPE1.

WA_BAPIQPGR_QPCD-CREATED_BY_USER = SY-UNAME.

WA_BAPIQPGR_QPCD-CREATED_ON_DATE = SY-DATUM.

APPEND WA_BAPIQPGR_QPCD TO LT_BAPIQPGR_QPCD.

WA_BAPIQPGR_QPCT-CODE = WA_ITAB-CODE.

WA_BAPIQPGR_QPCT-LANGU = 'EN'.

WA_BAPIQPGR_QPCT-SHORT_TEXT = WA_ITAB-KURZTEXT1.

APPEND WA_BAPIQPGR_QPCT TO LT_BAPIQPGR_QPCT.

ENDLOOP.

break-point.

CALL FUNCTION 'BAPI_QPGR_SAVEREPLICA'

EXPORTING

I_CODE_GROUP = LS_BAPIQPGR_QPGR

TABLES

CODE_GRP_SHORTTEXTTAB = LT_BAPIQPGR_QPGT

  • CODE_GRP_LONGTEXTTAB =

CODES_OF_CODE_GRP = LT_BAPIQPGR_QPCD

CODE_SHORTTEXTTAB = LT_BAPIQPGR_QPCT

  • CODE_LONGTEXTTAB =

RETURN = LT_BAPIRET2.

  • EXTENSION1 =

*LOOP AT LT_BAPIRET2 INTO WA_ITAB.

WRITE : / WA_BAPIRET2-MESSAGE_V1.

*ENDLOOP.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = 'X'.

Thanks,

Regards,

Saurabh