cancel
Showing results for 
Search instead for 
Did you mean: 

Using CI _ BBP _ ITEM _ SC

yann_bouillut
Active Contributor
0 Kudos

Hi,

I try to transfer a cuf field from catalogue to the SC.

I read the OCI documentation that explains 2 methods :

Method 1 :

I did not succeed in passing the value from catalogue to SC using method IF_EX_BBP_CATALOG_TRANSFER~ENRICH_ITEM_DATA

Here is my code to pass the new_item_cust_field1 froùcatalogue to the ztoto cuf field in the SC :

method IF_EX_BBP_CATALOG_TRANSFER~ENRICH_ITEM_DATA.

DATA: wa_sc_item_data TYPE BBP_PDS_SC_ITEM_D.

DATA: wa_catalog_content TYPE BBP_WS_OCI_ITEM_S.

LOOP AT catalog_content INTO wa_catalog_content.

LOOP AT et_sc_item_data INTO wa_sc_item_data

WHERE catalogitem = wa_catalog_content-cust_field1.

wa_sc_item_data-ztoto= wa_catalog_content-cust_field1.

MODIFY et_sc_item_data FROM wa_sc_item_data.

ENDLOOP.

ENDLOOP.

endmethod.

-

-


what's wrong in my code ?

Did anybody make it work ?

If yes, what are the step by step ?

Kind regards,

Yann

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Yann,

<u>Please try this code..</u>

Hope this will help.


method IF_EX_BBP_CATALOG_TRANSFER~ENRICH_ITEM_DATA.

DATA: wa_sc_item_data TYPE BBP_PDS_SC_ITEM_D.
DATA: wa_catalog_content TYPE BBP_WS_OCI_ITEM_S.

DATA: l_tabix TYPE sy-tabix.

  ev_sc_structures_used = 'X'.

LOOP AT et_sc_item_data INTO wa_sc_item_data
                 WHERE catalogitem = wa_catalog_content-cust_field1 
                        AND del_ind   EQ space. 

l_tabix = sy-tabix.

READ TABLE catalog_content INTO wa_cat_content INDEX l_tabix.

wa_sc_item_data-ztoto= wa_catalog_content-cust_field1.

MODIFY et_sc_item_data FROM wa_sc_item_data.


ENDLOOP.

endmethod.

Do let me know.

Regards

- Atul

yann_bouillut
Active Contributor
0 Kudos

Hi Atul,

Except two errors in your code : wa_cat_content to be replaced by wa_catalog_content

and

wa_sc_item_data-ztoto= to be replaced by wa_sc_item_data-ztoto =

The solution is working ))

Thanks

Kind regards,

Yann

Answers (1)

Answers (1)

Former Member
0 Kudos

Hey Yann,

I used <u>Method 1</u>. Codes almost identical,.. except that I also have the line

ev_sc_structures_used = 'X'.

Worth a shot I guess?

Cheers,

Foh

yann_bouillut
Active Contributor
0 Kudos

Hi Foh,

You mean inserting this line before the "MODIFY" line ?

If yes, i still have no update on my SC cuf field.

I have to precise that my ztoto SC CUF field is a XFELD one (flag).

Kind regards,

Yann

Former Member
0 Kudos

Hi Yann,

I actually had mine right before loop at catalog_content.

Cheers,

Foh

yann_bouillut
Active Contributor
0 Kudos

Hi,

Still not working

Kind regards,

Yann