• Home
  • About me
  • FALV
  • ALV Grid in the nutshell
    • Basic Information
    • Field catalog
  • Articles
    • Tricks
    • FALV (Fast ALV Grid)
    • ALV Grid in the nutshell
    • Tips
    • How to...
    • For beginners
    • Thoughts
  • By Topic
    • ALV
    • ALV OO
    • SALV
    • GOS
    • Selection screen
    • Purchase Requisitions
    • Purchase Orders
    • Attachments
    • Others
    • Characteristics
    • Sample Programs
    • ZIP
    • OLE
    • Mails
    • Routings
    • EWB
    • Excel
  • Keywords
  • RSS
  • Download
  • Home
  • Articles
  • How to...

Characteristic's own input screen - Part 6 - move reference data to bapi structures

Details
Łukasz Pęgiel
How to...
17 November 2013
Hits: 7075
Tags: BAPI_CLASS_READ , COC1_FEATURE_CHECK
Our characteristics update screen was displayed, data was changes so we need to read the reference data and put the values into BAPI structures in order to be able to save the values to database.
I will use here BAPI_CLASS_READ to read all possible characteristics and COC1_FEATURE_CHECK to get characteristic details.
 
Importing:

I_DATA TYPE REF TO DATA

Changing:

CT_OBJVALUESNUM TYPE TT_BAPI1003_ALLOC_VALUES_NUM
CT_OBJVALUESCHAR TYPE TT_BAPI1003_ALLOC_VALUES_CHAR
CT_OBJVALUESCURR TYPE TT_BAPI1003_ALLOC_VALUES_CURR

Exceptions:

NO_DATA_TO_PASS 

Add a comment
Read more ...

Characteristic's own input screen - Part 5 - show characteristic's own update screen

Details
Łukasz Pęgiel
How to...
14 November 2013
Hits: 10814
Tags: COC1_FEATURE_CHECK , CTMS_DDB_INIT , CTMS_CLASS_DDB , CTMS_DDB_SET_VAL_FROM_OBJECT , CTMS_DDB_SET_VALUE_INTERNAL , CTMS_DDB_SET_VALUE_ONLINE , CTMS_DDB_HAS_VALUES_INTERNAL
Now we're ready to build the data for screen output, call the update screen and then move the data back from screen to reference data. We will use here:
  • COC1_FEATURE_CHECK to get characteristic ID
  • CTMS_DDB_INIT to initialize memory 
  • CTMS_CLASS_DDB to put in memory classification settings
  • CTMS_DDB_SET_VAL_FROM_OBJECT to set values in update screen from existing object (option)
  • CTMS_DDB_SET_VALUE_INTERNAL to set values in update screen in case of using reference data structure
  • CTMS_DDB_SET_VALUE_ONLINE to call the update screen
  • CTMS_DDB_HAS_VALUES_INTERNAL to check and get the values from the update screen after user action
  • zcl_abapblog_com_classific=>create_structure_for_class to create reference data structure
  • zcl_abapblog_com_classific=>move_screen_val_to_ref_data to move screen values to reference data
  • zcl_abapblog_com_classific=>clear_initial_line_api_vari to delete initial line for multiple values characteristics
  • zcl_abapblog_com_classific=>move_ref_data_to_screen_val to move reference data to update screen values table
Add a comment
Read more ...

Characteristic's own input screen - Part 4 - Move screen values to reference data

Details
Łukasz Pęgiel
How to...
14 November 2013
Hits: 5665
Tags: KKEK_CONVERT_FLOAT_TO_CURR , COC1_FEATURE_CHECK
In previous article I've shown how to move characteristics from reference data to screen values table, this method is doing opposite way from screen values table to reference data structure.
 
Importing:

IT_VALUES TYPE TT_API_VALI -> screen values table
I_ATNAM TYPE API_VALI-ATNAM -> Characteristic Name

Changing:

C_DATA TYPE REF TO DATA

Exceptions:

NO_DATA_TO_CHANGE

Add a comment
Read more ...

Characteristic's own input screen - Part 3 - Move reference data values to screen

Details
Łukasz Pęgiel
How to...
14 November 2013
Hits: 7233
Tags: COC1_FEATURE_CHECK
Before we can call the screen with the characteristic value to change we need to convert data from our reference data structure to table of type TT_API_VALI. Following method shows how to do it.
 
Importing:

I_ATNAMTYPE API_VALI-ATNAM ->Characteristic Name
I_DATATYPE REF TO DATA-> our reference data

Changing:

CT_VALUES TYPE TT_API_VALI-> Structure for characteristic screen

Exceptions:

NO_DATA_TO_CHANGE

Add a comment
Read more ...

Characteristic's own input screen - Part 2 - Clear Initial Line

Details
Łukasz Pęgiel
How to...
31 August 2013
Hits: 8638
Tags: CTMS_DDB_SET_VALUE_ONLINE , CTMS_DDB_SET_VALUE_INTERNAL , CTMS_DDB_HAS_VALUES_INTERNAL , CTMS_DDB_SET_VAL_FROM_OBJECT
We've got method to convert internal value to float, now it's time for next one which I didn't suppose it would be needed but when I was calling CTMS_DDB_SET_VALUE_ONLINE to show input screen with previously filled data by CTMS_DDB_SET_VALUE_INTERNAL then for multiple value characteristic I was always receiving one additional line to these which was passed by me in export parameters. The funny thing was that it wasn't the case when CTMS_DDB_SET_VAL_FROM_OBJECT was used. Of course this line was initial but the values were treated after as imputed by user. So as always I started to debug the code to see why it's happening. Finally I found that internal table WS in the function group CTMS was not refreshed during the call of CTMS_DDB_SET_VALUE_INTERNAL. 
As I couldn't refresh it in any call of FM from this function group I had to use old trick with assignment of data from program in memory. But firstly I check with FM CTMS_DDB_HAS_VALUES_INTERNAL if any values are already there.
 
Importing:

IT_API_CHAR TYPE TT_API_CHAR -> Table type for structure api_char_tab

Add a comment
Read more ...

Characteristic's own input screen - Part 1 - Convert Values To Float

Details
Łukasz Pęgiel
How to...
31 August 2013
Hits: 12387
Tags: CHAR_VALUE_CHANGE2
Welcome back :-) 
Some time ago I presented how I get data from classifications to reference data variable ( or table). If you feel comfortable with my method then we can go further. I had a task to update some characteristic values from ALV grid, this would be not a problem at all if the characteristics would be defined from the begriming, but they weren't. In that case I couldn't just add needed fields to fieldcatalog and call FM to update characteristics when save button was pressed. I realized I need dynamic structure for ALV which will call standard screen for characteristic update. If this could be done then I could omit carrying about type of characteristics (date, number, char ) and if it is single o multiple type. So I started to dig in SAP, debug standard functions and I was finally able to prepare all needed functions.
 
So firstly what was needed (additionally to previously presented methods):
- method to show standard characteristics update screen with possibility to put there own values at call
- method to copy data from my reference data structure to screen values
- method to copy data from screen (after input) to my reference data structure
- method to copy data from my reference data structure to bapi tables (in order to save it)
- method to save characteristic value
- method to convert values from standard type (date, char, number, currency) to characteristic value (in float)
- method to clear initial line which was appearing when standard screen was called without reference to database values.
 
In this and following parts of this tutorial you'll see all mentioned methods and example of their usage. You can also find the code in attached NUGG file for easier import to your system.
Add a comment
Read more ...

Scan program for authority-check

Details
Łukasz Pęgiel
How to...
13 July 2013
Hits: 20788
Tags: AUTHORITY-CHECK , SCAN ABAP-SOURCE
Some years ago I was asked to create a report to check if in our Z-developments we are using authorization check or not. Of course not in all developments you need to have authorization check as sometimes standard SAP function modules provides proper checks inside them, but in many cases developer should take care about them inside the coding. The code I will provide below will scan program for AUTHORITY-CHECK statement and will collect the parameters of the call of AUTHORITY-CHECK. But one thing you have to have in mind, if developer used separate FM or class to check authorization then this report will not show any authorizations for program as it's looking only in the code of the program and not for the authorization-check inside called FM or classes.
 
Please look through the code or import to your system using nugg file.
Add a comment
Read more ...

Call standard F4 search help with customized parameters

Details
Łukasz Pęgiel
How to...
07 June 2013
Hits: 86544
Tags: F4IF_START_VALUE_REQUEST , DDSHIFACE , SAPGUI_SET_FUNCTIONCODE , F4IF_GET_SHLP_DESCR
During creation of selection screen or normal screen for your program you declare some fields and you want to use with them standard search help but with some modification like putting values to one of the search help parameters or making the SHLP parameter readonly then structure DDSHIFACE and FM F4IF_START_VALUE_REQUEST comes with a help. DDSHIFACE as you can see do not has much fields and for us the most interesting will be SHLPFIELD, VALFIELD, VALUE and DISPFIELD. In SHLPFIELD we will store the name of the SHLP parameter (names you can check in SE11), VALFIELD if filled will tell FM that value of this SHLP parameter should be returned to the user (value isn't important in our case so i'll put 'X' ). VALUE if filled set the value of SHLP parameter before showing the results of F4 call so we can directly restrict searched range with some data. Finally DISPFIELD if set makes the parameter on SHLP display only .
 
 
Add a comment
Read more ...

More Articles ...

  1. Classifications - Part 4 - example of use
  2. Classifications - Part 3 - get all objects assigned to class
  3. Classifications - Part 2 - Get Object Details
  4. Classifications - Part 1 - prepare structure for class data
  5. Create a nice looking chart with CL_GUI_CHART_ENGINE - Part 3 - Chart Data and render
  6. Create a nice looking chart with CL_GUI_CHART_ENGINE - Part 2 - Customization
  7. Create a nice looking chart with CL_GUI_CHART_ENGINE - Part 1 - Chart Designer
  8. Load variant to single subscreen (selection screen)
  9. F4 Help for external date
  10. Save variant for single selection screen subscreen
  11. Delete Routing - piece of cake
  12. Creating editor for dynamic code (SE38 like)
  13. Download CV01N/2N/3N documents to PC
  14. ZIP a file using ABAP
  15. Get filename and extension from full path
  16. Convert date to and from external date type
Page 4 of 6
  • Start
  • Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • Next
  • End


Łukasz Pęgiel
LVC FCAT BATTLESHIPS FIELDCATALOG RESET REJ ALLOWED ALV GRID IN THE NUTSHELL OUT GUI ALV GRID ADT SAVE USER OBJECTS IXML STREAM FACTORY ABAP STRUCTDESCR SALV TABLE SEARCH Secure call of starting new task using RM FREE SESSION CHECK FRIEND SCMS BINARY XSTRING ABAP Extensions - Automatic Logon CALL TRANSFORMATION Download CV01N 3N documents to PC STRING DOCUMENT CHECKBOX ALV GRID ALINK CONNECTION GTINSERT KKB SELECTIONS READ ZDEMO FALV08 - Mass replace function MSC7 ABAP DEVELOPMENT TOOLS IN ECLIPSE GET SELECTED ROWS CTMS CLASS DDB The SIN of progress indicator ISTREAM COMPONENTS REFRESH MAINTAIN COC1 FEATURE CHECK VARIANT CATALOG ESRUO - MM settings table - Part 2 RSBCS EXAMPLE EMAIL SIMPLE DISPLAY UPDATE PREPARE Battleships game two players SAP WebIDE CONTROLLER METADATA GTGET GLOBALS FROM SLVC FULLSCR ABAP FAVORITES WYSIWYG HTML Editor in ABAP SLIN PSEUDO COMMENTS CELLS About me RELATION CREATE ABAP Code Retreat Tychy 2019 - Organizer Recap ESDUS PURCHASE REQUISITION MS07 REUSE
  • Laserowe usuwanie blizn Tychy
  • Laserowe usuwanie zmarszczek Tychy
  • Salon Kosmetyczny Tychy
  • Trycholog Tychy
  • Wypadanie włosów Tychy
Tweets by abapblog

Eclipse Plugins for ABAP

ABAP Favorites

Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client

ABAP ADT Extensions

Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client

ABAP Quick Fixes

Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client

 

Latest Articles

  • ABAP in Eclipse - Install, Configure, Use, and Enhance Your ADT
  • ALV Grid in the nutshell: Field catalog - col_id - ALV control: Column ID
  • ALV Grid in the nutshell: Field catalog - dfieldname – Fieldname for column group
  • ALV Grid in the nutshell: Field catalog - Hotspot - ALV control: SingleClick-sensitive
  • ALV Grid in the nutshell: Field catalog - sp_group - Group key
  • ALV Grid in the nutshell: Field catalog - domname - Domain name
  • ALV Grid in the nutshell: Field catalog - reprep - ALV control: Value is selection criterion for rep./rep.intf.
  • ALV Grid in the nutshell: Field catalog - reptext – Heading
  • ALV Grid in the nutshell: Field catalog - lowercase - Lowercase letters allowed/not allowed
  • ALV Grid in the nutshell: Field catalog - intlen - Internal Length in Bytes
  • Downloading Exchange Rates from NBP (National Bank of Poland)
  • Downloading Exchange Rates from Central Bank of Turkey
  • ABAP Extensions - Automatic Logon
  • ALV Grid in the nutshell: Field catalog - inttype - ABAP data type (C,D,N,...)
  • ALV Grid in the nutshell: Field catalog - datatype

Most Read

  • Create XLSX/MHTML file from internal table in background
  • Refresh ALV GRID and keep position and current cell
  • Create XLSX file from internal table in background v2
  • FALV (Fast ALV Grid)
  • ATC Pseudo Comments list
  • Call standard F4 search help with customized parameters
  • Dynamic GUI STATUS & TITLE with ABAP code
  • Create fieldcatalog from internal table
  • Link Attachments of Purchase Requisition to Purchase Order
  • GOS - How to add business documents at creation of object
  • Endless loop in BADI ME_PROCESS_PO_CUST
  • Create a nice looking chart with CL_GUI_CHART_ENGINE - Part 3 - Chart Data and render
  • How to access private or protected data and methods of CL_GUI_ALV_GRID
  • Subtotal lines of ALV GRID OO as content separator
  • Popup with multi-select ALV
feed-image Feed Entries

Latest Comments

ABAP code and articles provided on http://abapblog.com, if it is not statet otherwise, were created by Łukasz Pęgiel. You can use the code in your SAP instance for commercial and non-commercial use without any warranty from side of the author. You cannot sell the code as a full program or a part of it.
Replicating of the articles and code is prohibited unless the agreement of the author is given to you. 

Bootstrap is a front-end framework of Twitter, Inc. Code licensed under MIT License. Font Awesome font licensed under SIL OFL 1.1.