‎2007 Apr 05 2:26 AM
Hi,
i need to upload logo in sap script according to company code.
we have one sap script and we want to change logo according to company code.
how can i write condition in sap script..
sample code woule be appericiated.
please neaded urgently...
Thanks,
Jignesh
‎2007 Apr 05 3:51 AM
Hi,
You have two options here.
<b>[1].</b> Write a condition for each company code and print logo accordingly. It looks like this
/: IF &COMPANY& = 'COM1'.
* print logo for company COM1
/: ELSEIF &COMPANY& = 'COM2'.
* print logo of company COM2
/: ELSEIF &COMPANY& = 'COM3'.
* print logo of company COM3
............
............
/: ENDIF.<b>[2].</b> Create a custom table and maintain logo entry ( LOGO name, Object, ID, Colorm DPI ).
Get the data from table based on company code and
display logo. In this case your code would be line this.
/* *&*** Define symbol for LOGO **********************************&*
/: DEFINE &ZLOGO& = ' '.
/: DEFINE &ZOBJECT& = ' '.
/: DEFINE &ZID& =' '.
/: DEFINE &ZCOLOR& = ' '.
/: DEFINE &ZDPI& = ' '.
/*
/* *&*** Call form routien GET_LOGO to get LOGO detail ***********&*
/: PERFORM GET_LOGO IN PROGRAM ZRMM_POPOOL
/: USING &EKKO-BUKRS&
/: CHANGING &ZLOGO&
/: CHANGING &ZOBJECT&
/: CHANGING &ZID&
/: CHANGING &ZCOLOR&
/: CHANGING &ZDPI&
/: ENDPERFORM
/*
/* *&***** DISPLAY LOGO ******************************************&*
/: BITMAP &ZLOGO& OBJECT &ZOBJECT& ID &ZID& TYPE &ZCOLOR& DPI &ZDPI&We have the same situation for PO SAPScript. In fact we have logos stored based on "Company code" and "Profit center" conbination. So, we maintains on Z table with "company code' and "profit center" being key and store Logo, object, ID, color and DPI.
You can also use the solution no 2. It is easy to implement. An in future if you add company code, just add entry in Z table, rest will work.
Let me know if you need any other information.
Regards,
RS
‎2007 Apr 05 3:51 AM
Hi,
You have two options here.
<b>[1].</b> Write a condition for each company code and print logo accordingly. It looks like this
/: IF &COMPANY& = 'COM1'.
* print logo for company COM1
/: ELSEIF &COMPANY& = 'COM2'.
* print logo of company COM2
/: ELSEIF &COMPANY& = 'COM3'.
* print logo of company COM3
............
............
/: ENDIF.<b>[2].</b> Create a custom table and maintain logo entry ( LOGO name, Object, ID, Colorm DPI ).
Get the data from table based on company code and
display logo. In this case your code would be line this.
/* *&*** Define symbol for LOGO **********************************&*
/: DEFINE &ZLOGO& = ' '.
/: DEFINE &ZOBJECT& = ' '.
/: DEFINE &ZID& =' '.
/: DEFINE &ZCOLOR& = ' '.
/: DEFINE &ZDPI& = ' '.
/*
/* *&*** Call form routien GET_LOGO to get LOGO detail ***********&*
/: PERFORM GET_LOGO IN PROGRAM ZRMM_POPOOL
/: USING &EKKO-BUKRS&
/: CHANGING &ZLOGO&
/: CHANGING &ZOBJECT&
/: CHANGING &ZID&
/: CHANGING &ZCOLOR&
/: CHANGING &ZDPI&
/: ENDPERFORM
/*
/* *&***** DISPLAY LOGO ******************************************&*
/: BITMAP &ZLOGO& OBJECT &ZOBJECT& ID &ZID& TYPE &ZCOLOR& DPI &ZDPI&We have the same situation for PO SAPScript. In fact we have logos stored based on "Company code" and "Profit center" conbination. So, we maintains on Z table with "company code' and "profit center" being key and store Logo, object, ID, color and DPI.
You can also use the solution no 2. It is easy to implement. An in future if you add company code, just add entry in Z table, rest will work.
Let me know if you need any other information.
Regards,
RS