06-28-2019 1:50 PM
Hi All,
Here's my issue during creation of a sales order - a popup with all the contracts on it displays. That was done with configuration. Now we want to add more fields without modification. I can fill BSTKD without any problem. However, it won't display. You'll notice my modification of "or BSTKD". The code works if do that. However, I've been told no modifications.
It seems like an impossible task - so I give you mission impossible for me.
The screen display is screen 700. The include is LV45CF0A line 149. The subroutine is ausgabe_liste_hinweis. I have seen other solutions here, but they all seem to include modification.
I'm on version 7.5. We are still using the old transactions right now.
Any and all ideas are appreciated,
Michelle
The code:
LOOP AT lt_fieldcat ASSIGNING <ls_fieldcat>.
<ls_fieldcat>-tech = 'X'.
CASE <ls_fieldcat>-fieldname.
*{ REPLACE DEVK904328 1
* WHEN 'AUART' OR 'VBELN' OR 'DATAB' OR 'DATBI'.
WHEN 'AUART' OR 'VBELN' OR 'DATAB' OR 'DATBI' or
'BSTKD'.
*} REPLACE
CLEAR <ls_fieldcat>-tech.
WHEN 'KUNNR'.
IF ( kopfebene CA 'XC' AND add_field_show = 1 )
OR kopfebene CA 'D'.
CLEAR <ls_fieldcat>-tech.
ENDIF.
WHEN 'POSNR' OR 'KWMENG' OR 'MEINS' OR 'NETWR' OR 'WAERK'.
IF kopfebene CA ' '.
CLEAR <ls_fieldcat>-tech.
ENDIF.
WHEN 'ABRUF_PART'.
IF kopfebene CA 'D'.
CLEAR <ls_fieldcat>-tech.
ENDIF.
ENDCASE.
ENDLOOP.
06-28-2019 2:36 PM
Hi Michelle,
I was suggesting to check "NO_OUT" Field to, but then I checked the code a bit better in my release and i see this
The fieldcat is generated from structure LISTVBAP, but that structure has no "BSTKD" field
This, at least, in my release.
Check there and, in case, add the field in the structure and it should work.
Simone
06-28-2019 2:36 PM
Hi Michelle,
I was suggesting to check "NO_OUT" Field to, but then I checked the code a bit better in my release and i see this
The fieldcat is generated from structure LISTVBAP, but that structure has no "BSTKD" field
This, at least, in my release.
Check there and, in case, add the field in the structure and it should work.
Simone
06-28-2019 2:50 PM
So the code I wrote above will work - but it is with the modification to SAP code. Which I'm not supposed to do. I did append LISTVBAP with "BSTKD" field. (I didn't meantion that above.)
No_out is blank. I'm not sure how to change that when the field catalog is local to the subroutine. The call to display it is in that subroutine.
My brain is officially fried. The hard coding in the SAP program makes it very hard to change. I was going to loop through the field catalog and change the tech field. Of course I can't use an implicit enhancement because of where the field catalog is built and where the ALV is called.
Thank you for taking the time to look at this!
06-28-2019 2:52 PM
c436ae948d684935a91fce8b976e5aa7 my solution, in this cases, is to set an enhancement at the beginning of the form/routine, invoking my own form where i copy all the standard code and add my custom changes and then leave the original routine.
Not the best way, because you loose any possible improvement or fix, but at least you avoid to change standard code.
06-28-2019 2:57 PM
Perfect! - It gets away from the no change rule. I don't really like the idea. But it does work.