cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Documents And Attachments

Former Member
0 Kudos

Dear Friends,

We are implementing SRM 5.0 and i am facing problem with 'Documents And Attachments' tab of shopping cart. I am trying to send 'Alternate Address' from BSP application to the shopping cart as a Text in Documents And Attachments. To transfer this data to BBP_CATALOG_TRANSFER badi i am making use of NEW_ITEM-LONGTEXT_n:132[] field.

I have created a new TextID in SPRO as 'ZADD'. In BBP_DOC_CHANGE_BADI i'm changinging CT_LONGTEXT-TDID from ITXT(text id for Vendor Text and is a default value of TDID in CT_LONGTEXT) to ZADD(Alternate Address). Doing this, i am able to see the data in 'Text preview' of Documents And Attachment against Alternate Address but when i click on the Alternate Address link the data disappears from the preview and also is not displayed in the text area below.

Kindly let me know if i have missed out any step and the correct way of achieving it.

Regards,

B.Siddhesh

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Friends,

I got the solution for this issue and sharing it with you all.

Before my code was something this,


LOOP AT ct_longtext INTO wa_longtext.
      wa_longtext-tdid = 'ZADD'.
      MODIFY ct_longtext FROM wa_longtext INDEX sy-tabix TRANSPORTING tdid.
ENDLOOP.

Then i modified it to something like this,


LOOP AT ct_longtext INTO wa_longtext WHERE tdid EQ 'ITXT' AND counter NE '00000'.
      wa_longtext-tdid = 'ZADD'.
      MODIFY ct_longtext FROM wa_longtext INDEX sy-tabix TRANSPORTING tdid.
ENDLOOP.

which resolved the problem.

Basically what used to happen before is the Vendor Text would be selected by default. When I click on any other link for e.g. Alternate Address the program calls BBP_DOC_CHANGE_BADI with textid in CT_LONGTEXT as ITXT but without any data and counter as '00000'. My code used to modify ITXT with ZADD because of which the data was getting lost. After making changes the data is getting displayed in the textarea as well as in the text preview of Documents and Attachments tab.

Regards,

B.Siddhesh