Orders received via EDI in SAP is processed by IDOC_INPUT_ORDERS function module which extracts data from IDoc structure EDIDC and EDIDD carry out validation fill in missing data based on configuration table for example Sales organisation, order type, item category etc prepares the BDCDATA structure and then calls VA01 transaction using CALL TRANSACTION statement. Function module calls customer exits at various points during processing to consider customer specific requirement. To add customer specific logic to function module it is necessary to understand what goes on in function module and at what point exit are called.
My Experiments with ABAP
Friday, February 1, 2013
IDOC_INPUT_ORDERS Customer Exits
Labels:
Customer-exit,
EDI,
Enhacement,
Quick Reference,
SAP SD
Wednesday, January 30, 2013
Uploading JPG image to SE78 (Administration of Form Graphics)
Images are mostly stored in JPG format because of its smaller file size. However, SAP graphics administration SE78 which stores images for sapscript and smartform only supports TIFF and BMP. You can always use Microsoft Paintbrush to convert JPG to BMP and then upload file to SE78 however with large number of files this will be time consuming for users. On the other hand, SE78 interface is not very user friendly, developing a custom program to upload files in SE78 programmatically will greatly improve user experience at the same time it will let you add additional business logic you want to run during upload. For example, whilst uploading employee image you may want to maintain mapping between employee id and image uploaded.
Labels:
Sample Code,
Sapscript,
Smartforms,
Tutorial,
Utility
Tuesday, January 29, 2013
Uploading image file into SE78 using ABAP Program
SE78 user interface isn't one of the best available in SAP, users most probably will struggle especially if they have to upload images often. Although it has got all the said function i.e. search, preview, upload etc. and serves the purpose you still have to consider some sort of custom upload program if any of below is your requirement.
1. A simpler interface
2. Upload images from application server
3. Enforce a naming convention of images, or auto naming of images.
4. Mass upload of images
1. A simpler interface
2. Upload images from application server
3. Enforce a naming convention of images, or auto naming of images.
4. Mass upload of images
Labels:
Quick Reference,
Sample Code,
Sapscript,
Smartforms
Friday, January 25, 2013
Run external operating system command
You can run an operating system command or any executable on application server from your program using function module SXPG_COMMAND_EXECUTE. Before you do that, however, an external operating system command needs to be registered in transaction SM69. In this blog I will show you how to create a new external operating system command and execute that using function module SXPG_COMMAND_EXECUTE by passing parameter to it.
Labels:
Quick Reference,
Sample Code,
SAP Basis,
Sapscript,
Smartforms
Wednesday, January 23, 2013
Upload file from presentation server to application server
Below is code to upload a file onto application server from presentation server. It give users opportunity to browse for desired file. When program is executed it check the existence of file on presentation server and if file exists, it will start upload and store it on application server.
Destination of file on application server is D:\tmp\, if it is different in your case then change the value of constant C_SERVERPATH. In this particular program I am uploading JPG image however you can use it to upload any file. Also I am naming presentation file based on userid of current user which you may like to change.
Destination of file on application server is D:\tmp\, if it is different in your case then change the value of constant C_SERVERPATH. In this particular program I am uploading JPG image however you can use it to upload any file. Also I am naming presentation file based on userid of current user which you may like to change.
Labels:
Quick Reference,
Report,
Sample Code,
SAP ABAP
Subscribe to:
Posts (Atom)