Type | Template | Report |
---|---|---|
Excel | Template | Report |
Word | Template | Report |
Word | Template | Report |
Adobe PDF | Template | Report |
xtt->MERGE( IV_BLOCK_NAME = ‘R’ IS_BLOCK =
{"TITLE"=>"Test icons", "T"=>[{"ID"=>"@00@", "NAME"=>"ICON_DUMMY", "IMG"=>"REF UNSUPPORTED", "RAW"=>"R0lGODlhEAAQAJEAAAAAAP8A/4CAgP///yH5BAEAAAEALAAAAAAQABAAAAKRTJgwYcKECRMmTJgwYcKECRMmTJgwIECACBMmTJgQokSJAhMmTBhQokSJEhEmTAhRo0SJEwUmTAhR4kSNEgUmTAhRosaJEgUmTAhRosaJEgUmTAhR4kSNEgUmTAhRo0SJEwUmTBhQokSJEhEmTJgQokSJAhMmTJgwIECACBMmTJgwYcKECRMmTJgwYcKECRMmLAA7"}, {"ID"=>"@01@", "NAME"=>"ICON_CHECKED", "IMG"=>"REF UNSUPPORTED", "RAW"=>"R0lGODlhEAAQALMAAAAAAE2mGf8A/5LAACRNDAAA9AAgHAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAIALAAAAAAQABAAAAQxUMhJq70YA5ApGAHXfQEhaqDpnQKpTkAQSi7bBsNWX3Ge2jDZbyR7ZQAE4wjYaTonEQA7"}, {"ID"=>"@02@", "NAME"=>"ICON_INCOMPLETE", "IMG"=>"REF UNSUPPORTED", "RAW"=>"R0lGODlhEAAQAKIAAAAAAP+ZmZkAAMQAJv8A//8AAAAgHAACACH5BAEAAAQALAAAAAAQABAAAAOWSEREhEREREhERIRERERIRESERERESEREhEREREhEAIRERABIRESEEAFESBABhEREEFgDBIElQERIRDCFA1ECSEREhEQwFVgCRIRERERIUFWARERESEQEgTU1QEhERIQEUQI4NUCEREQQWAIEgyVAREgEIYBEBCIIRESEBEBESARAhEREREhERIRERERIRESERERESESUADs="}, {"ID"=>"@03@", "NAME"=>"ICON_FAILURE", "IMG"=>"REF UNSUPPORTED", "RAW"=>"R0lGODlhEAAQAKIAAAAAAOjSWP//1v8A////AAAA9AAgHAACACH5BAEAAAMALAAAAAAQABAAAAOWODMzgzMzMzgzM4MzMzM4MzODMzMACDAzgAAzMzgDIoAzIAE4MzODQAEDKBQwgzMzQBgAEoQBMzM4AxSAEkABODMzg0AkAQgUMIMzM0BIAQOEATMzOAMUgDNAATgzM4MAMAAIFACAMzMzODNAhBQwMzgzM4MzQAE4MzODMzMzOAAzgzMzMzgzM4MzMzM4MzODMzMzODOTADs="}, {"ID"=>"@04@", "NAME"=>"ICON_POSITIVE", "IMG"=>"REF UNSUPPORTED", "RAW"=>"R0lGODlhEAAQAKIAAF99AO75/cvU4f8A/0BAQAAA9AAgHAACACH5BAEAAAMALAAAAAAQABAAAAOWODMzgzMzMzgzM4MzMzM4MzODMzMzSEREhEQzMzgzFIERESFIMzODFBERGBEhhDMzFBgRAIERQjM4QxGBARARKDQzgxQBAAgAIYQzMxQYAACAEEIzOEMRgQEQESg0M4MUEQEIESGEMzMkGBERgRFCMzgzJIIiIiJIMzODM0RESEQ0gzMzMzgzM4MzMzM4MzODMzMzODOTADs="}, {"ID"=>"@05@", "NAME"=>"ICON_NEGATIVE", "IMG"=>"REF UNSUPPORTED", "RAW"=>"R0lGODlhEAAQAKIAAP9mZu75/cvU4f8A/0BAQAAA9AAgHAACACH5BAEAAAMALAAAAAAQABAAAAOWODMzgzMzMzgzM4MzMzM4MzODMzMzSEREhEQzMzgzFIERESFIMzODFBERGBEhhDMzFBgREYERQjM4QxGBERERKDQzgxQBAAgAIYQzMxQYAACAEEIzOEMRgRERESg0M4MUEREYESGEMzMkGBERgRFCMzgzJIIiIiJIMzODM0RESEQ0gzMzMzgzM4MzMzM4MzODMzMzODOTADs="}, {"ID"=>"@06@", "NAME"=>"ICON_LOCKED", "IMG"=>"REF UNSUPPORTED", "RAW"=>"R0lGODlhEAAQAKIAAAAAAG+MnP8A/4+SwGZmZv///7+/vwACACH5BAEAAAIALAAAAAAQABAAAAOWKCIigiIiIigiIoIiAgAIICKCIiIiCFVlhiAiIigiUIUAYAYoIiKCAgUiKFAggiIiAlggIoAFIiIoIlCAIgIFKCIigQAAAAgAAIEiAlVYVVWFVQMiKFAzgzMzM0ggIoA1MzM4M0OAIgI1ODMzgzMEIihQM4MzMzNIICKANTMzODNDgCICQ0hERIREBCIoAgCAAAAACCKSADs="}, {"ID"=>"@07@", "NAME"=>"ICON_UNLOCKED", "IMG"=>"REF UNSUPPORTED", "RAW"=>"R0lGODlhEAAQAKIAAAAAAG+MnP8A/4+SwGZmZv///7+/vwACACH5BAEAAAIALAAAAAAQABAAAAOWKCIigiIiIigiIoIiIiIoAACAIiIiKCIChVVmICgiIoICVQAIZiCCIiICWCAigAUiIigiUIAiAgUoIiKCAgUiKFAQgAAAAAgAIYABUFVYVVWFAyIiCDUzgzMzBCgiAoUzMzM4QyCCIlAzODMzgwQiIgg1M4MzMwQoIgKFMzMzOEMggiIwREhERIQEIiIoAACAAAAgKCKSADs="}, {"ID"=>"@0B@", "NAME"=>"ICON_TOTAL_LEFT", "IMG"=>"REF UNSUPPORTED", "RAW"=>"R0lGODlhEAAQAIAAAAAAAP8A/yH5BAEAAAEALAAAAAAQABAAAAKRTJgwYcKECRMmTJgwYcKECRMmTJgwYcKECRMmTJgQYMKECREmTJgQYMKEAREmTJgQYMKEABEmTJgQYMKAABEmTJgQYEKAABEmTJgQYECAABEmTJgQYEKAABEmTJgQYMKAABEmTJgQYMKEABEmTJgQYMKEAREmTJgQYMKECREmTJgwYcKECRMmTJgwYcKECRMmLAA7"}, {"ID"=>"@0C@", "NAME"=>"ICON_TOTAL_RIGHT", "IMG"=>"REF UNSUPPORTED", "RAW"=>"R0lGODlhEAAQAIAAAAAAAP8A/yH5BAEAAAEALAAAAAAQABAAAAKRTJgwYcKECRMmTJgwYcKECRMmTJgwYcKECRMmTBgwYcKEABMmTBgQYcKEABMmTBgQYMKEABMmTBgQIMKEABMmTBgQIMCEABMmTBgQIECEABMmTBgQIMCEABMmTBgQIMKEABMmTBgQYMKEABMmTBgQYcKEABMmTBgwYcKEABMmTJgwYcKECRMmTJgwYcKECRMmLAA7"}, {"ID"=>"@0D@", "NAME"=>"ICON_COLUMN_LEFT", "IMG"=>"REF UNSUPPORTED", "RAW"=>"R0lGODlhEAAQAIAAAAAAAP8A/yH5BAEAAAEALAAAAAAQABAAAAKRTJgwYcKECRMmTJgwYcKECRMmTJgwYcKECRMmTJgwYcKACRMmTJgwYUKACRMmTJgwYUCACRMmTJgwIUCACRMmTJgwIECACRMmTJgQIECACRMmTJgwIECACRMmTJgwIUCACRMmTJgwYUCACRMmTJgwYUKACRMmTJgwYcKACRMmTJgwYcKECRMmTJgwYcKECRMmLAA7"}, {"ID"=>"@0E@", "NAME"=>"ICON_COLUMN_RIGHT", "IMG"=>"REF UNSUPPORTED", "RAW"=>"R0lGODlhEAAQAIAAAAAAAP8A/yH5BAEAAAEALAAAAAAQABAAAAKRTJgwYcKECRMmTJgwYcKECRMmTJgwYcKECRMmTJgwIcKECRMmTJgwIcCECRMmTJgwIUCECRMmTJgwIUCACRMmTJgwIUCACBMmTJgwIUCAABMmTJgwIUCACBMmTJgwIUCACRMmTJgwIUCECRMmTJgwIcCECRMmTJgwIcKECRMmTJgwYcKECRMmTJgwYcKECRMmLAA7"}, {"ID"=>"@0F@", "NAME"=>"ICON_PAGE_RIGHT", "IMG"=>"REF UNSUPPORTED", "RAW"=>"R0lGODlhEAAQAIAAAAAAAP8A/yH5BAEAAAEALAAAAAAQABAAAAKRTJgwYcKECRMmTJgwYcKECRMmTJgwYcKECRMmTIgwYUKECRMmTAgwYUKACRMmTAgQYUKACBMmTAgQYEKAABMmTAgQIEKAABEmTAgQIECAAAEmTAgQIEKAABEmTAgQYEKAABMmTAgQYUKACBMmTAgwYUKACRMmTIgwYUKECRMmTJgwYcKECRMmTJgwYcKECRMmLAA7"}, {"ID"=>"@0G@", "NAME"=>"ICON_PAGE_LEFT", "IMG"=>"REF UNSUPPORTED", "RAW"=>"R0lGODlhEAAQAIAAAAAAAP8A/yH5BAEAAAEALAAAAAAQABAAAAKRTJgwYcKECRMmTJgwYcKECRMmTJgwYcKECRMmTJgwYcCECQMmTJgwIcCECQEmTJgwIMCEAQEmTJgQIMCEAAEmTBgQIMCAAAEmTAgQIECAAAEmTBgQIMCAAAEmTJgQIMCEAAEmTJgwIMCEAQEmTJgwIcCECQEmTJgwYcCECQMmTJgwYcKECRMmTJgwYcKECRMmLAA7"}, {"ID"=>"@0H@", "NAME"=>"ICON_PREVIOUS_VALUE", "IMG"=>"REF UNSUPPORTED", "RAW"=>"R0lGODlhEAAQAIAAAAAAAP8A/yH5BAEAAAEALAAAAAAQABAAAAKRTJgwYcKECRMmTJgwYcKECRMmTJgwYcKECRMmTJgwYcKECRMmTJgwYcKECRMmTJgwYcKECRMmTAgQIECAABEmTBgQIECAABMmTJgQIECACBMmTJgwIECACRMmTJgwIUCECRMmTJgwYcCECRMmTJgwYcKECRMmTJgwYcKECRMmTJgwYcKECRMmTJgwYcKECRMmLAA7"}]}
).
ZCL_XTT_IMAGE class
In the previous example №10 pictures were created using the ZCL_XTT_IMAGE class.
Is it possible to somehow simplify this process?
Why is this necessary?
- To create a picture on the ABAP side you need a special factory method. If the internal implementation would be changed in the future, the “hard” reference to the class and method will not allow you to do this painlessly
- To understand the template, you need to view the ABAP code, since the type {R-T-IMG} is unknown
- If a template is used, the image actually needs only binary data
- Without a template, you must also specify the height, width and extension of the file (.jpg by default)
Addition ‘;type=image’
This addition allows you to “convert” binary data (xString) into a picture without calling an additional ABAP method
The example 11 uses the data in the 10th. But by using RAW TYPE XSTRING field for output instead of IMG TYPE REF TO ZCL_XTT_IMAGE
The ZCL_XTT_IMAGE class is used only indirectly. All additional parameters to the ZCL_XTT_IMAGE=>CREATE_IMAGE( ) method can be passed through:
- ;width=
- ;height=
- ;ext=
from the template itself, in more complex cases you need to use a special “template” for pictures (see column F)