To benefit from fbgendat for SAP function modules, the following two options can be used:
- Insert the fbgenmac command at the beginning of the source code via an implicit extension (the include must also be inserted for this).
- Call the function module in a separate function module with the same parameters.
The following is a brief guide to the second option, as no extension is required for this.
1. make the SAP function module known in the SE38 -> FBGENDAT (e.g. SD_VBUK_READ_FROM_DOC).
2. copy the SAP function module to a function module in the customer namespace (e.g. ZSD_VBUK_READ_FROM_DOC). All parameters are copied.
3. delete the coding in the copied own module. Now call the Fbgenmac command in the customer’s own function module. Enter the name of the SAP function module there.
4. call the SAP function module with all parameters in the coding and return the data again
.
5. the newly created, customer-specific function module can now be called instead of the SAP-FuBa in the coding in which the SAP module would otherwise have been called. For example, in the methods for an OData service The newly created, customer-specific function module can now be called instead of the SAP-FuBas in the coding in which the SAP module would otherwise have been called. For example, in the methods for an OData service.
When called, the test data is now stored completely in the directory of the SAP function module.
With FBGENDAT there is a way to automatically save the interface calls of self-developed function modules and thus create a test data directory. Read how it works.
Do you have any questions?
Get in touch with us.