[ABAP] – Filter View Data by Authorization-Object Field

31 03 2011

Method for get dynamic content value for a TABLE VIEW,

by adding custom field in AUTHORIZATION-OBJECT (ZFIELD & ZFIELDVAL).

1 – Authorization Object Creation (you can refer to this document)

2- Assign Role to User & Input Value for your Authorization Fields

3- Go to SE11, select your table, generate the Table View

4- Go to SE11 -> Utilities -> Table Maintainance Generation -> Environment -> Modification -> Events

5- Set a Program Name for Event type AA


6- Develope your Authorization Get Value Method


 

7- Call Method in your Program for TableView Event

8- Check your RESULT!








[ABAP] – Learning Content to Use With the New ABAP 7.02 Trial

10 01 2011
URL: http://www.sdn.sap.com/irj/scn/downloads?rid=/library/uuid/80db43c2-9ee5-2d10-de8e-547de363868
With the recent release of the ABAP 7.02 trial edition, many people might be looking for good learning materials and demos to try out all the new functionality available in this release level.  In this blog I try to collect some of these sources. 

Other SCN Content

One of your first stops after installing the ABAP 7.02 trial (or if you are looking for something to read during the installation process), should be the new functions and features page here on SCN. It does a nice job of summarizing the high level feature areas and give you an excellent starting point to perform further research.

There have also been several blogs released in the last week, all focused on the 7.02 ABAP topic and of the things you can try in 7.02 once you have the trial installed.

All of these provide great starting points, particularly for learning new ABAP syntax or workbench capabilities.

Although not directly SCN hosted, it’s probably important to note that the 7.02 version of help.sap.com is now live. I personally find the New Features section of the online help useful when learning the delta features.  For example if you want an overview of the new functionality in Web Dynpro ABAP in 7.02, here is the link you should start with on help.sap.com.

TechEd 2010

TechEd was also a great source of information on the new features in ABAP 7.02.  Don’t forget that many of the sessions were recorded and can be viewed at any time. These sessions can be viewed here: http://www.virtualsapteched.com/

Particularly on the topic of new features you want to learn about in this trial, you might watch the replays of CD105 – What’s New in Web Dynpro ABAP 7.01 and 7.02 and CD203 – Best Practices for Designing Web Dynpro ABAP User Interface.

If you attended TechEd this year, you might have noticed that we didn’t give out the source code to the attendees for many of the usual workshops.  This was mostly because the source code was based upon NetWeaver 7.02 and without a trial edition at that release level yet, it wouldn’t do anyone much good.  Thankfully we now have the 7.02 trial, so we have started uploading some of the code to the SAP Code Exchange.

I have created a Code Exchange project to house transports that can be imported into the 7.02 to deliver some of the demos and exercises we used at TechEd: https://cw.sdn.sap.com/cw/groups/sap-teched-2010-abap-702-examples-and-demo

image

Currently I have uploaded the content from CD160 – Introduction to Web Dynpro ABAP, CD105 – What’s New in Web Dynpro ABAP 7.01 and 7.02, CD203 – Best Practices for Designing Web Dynpro ABAP User Interfaces, and CD266 – Update Your ABAP Development Skills to NetWeaver 7.0 and Beyond.

If you access the Code Exchange project and go to the Releases tab (after accepting the Terms of Usage), you will see individual download files. Each contains ABAP transport files for the various areas covered.  There is a file for all the CD266 Exercises and the CD160 exercises.  There are also transports for the various demos, such as the performance demos used in CD203 or the Flash Islands and Silverlight Islands demoed in CD105.

If you need any general advice on how to import transports into the trial edition ABAP AS, I would recommend this blog:http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6380.  Its a little bit older now and focused on an early release level, but the overall process of performing transports is sound.





[ABAP] – Workitem Intimation in the Email

3 01 2011

http://wiki.sdn.sap.com/wiki/display/ABAP/Workitem+intimation+in+the+email





[ABAP] – Dynamic Table Collect

11 10 2010

Hi guys,
For my first article, a little tools for collect a table, based on a dynamic collect field value, contained in a Database Table.

set_aggregazione-method

Check it out the method:

DECLARATION:
class-methods SET_AGGREGAZIONE_DYNAMIC
importing
!IT_COLLECT_FIELD type ANY TABLE
!IT_POSITION type ANY TABLE
exporting
!EV_ESITO type C
!ET_POSITION type ANY TABLE .

Implementation:

METHOD set_aggregazione_dynamic.

DATA: lv_tabix_d       TYPE syst-tabix,
lt_position_type TYPE REF TO data.
FIELD-SYMBOLS: <lt_collect_field> TYPE ANY TABLE,
<ls_collect_field> TYPE ANY,
<ls_position_s>    TYPE ANY,
<ls_position_d>    TYPE ANY,
<lt_position>      type STANDARD TABLE.
*
FIELD-SYMBOLS: <lfs_value1> TYPE ANY.
DATA: lv_key1(40) TYPE c VALUE ‘HKONT’,
lv_value1(40) TYPE c VALUE ‘HKONT’.
*
ASSIGN it_collect_field TO <lt_collect_field>.
CREATE DATA lt_position_type LIKE it_position.
ASSIGN lt_position_type->* to <lt_position>.

LOOP AT <lt_collect_field> ASSIGNING <ls_collect_field>.

lv_key1 = <ls_collect_field>.
LOOP AT it_position ASSIGNING <ls_position_s>.
ASSIGN COMPONENT lv_key1 OF STRUCTURE <ls_position_s> TO <lfs_value1>.
READ TABLE <lt_position> ASSIGNING <ls_position_d> WITH KEY (lv_key1) = <lfs_value1>.
IF sy-subrc NE 0.  “Insert
APPEND <ls_position_s> TO <lt_position>.
ELSE.   “Collect
lv_tabix_d = sy-tabix.
MODIFY <lt_position> FROM <ls_position_d> INDEX lv_tabix_d.
ENDIF.
ENDLOOP.
ENDLOOP.

*
IF NOT <lt_position> IS INITIAL.
et_position[] = <lt_position>.
ev_esito = ga_esito_positivo.
ELSE.
ev_esito = ga_esito_negativo.
ENDIF.

ENDMETHOD.