Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Please give answers for this. This is urgent

Former Member
0 Kudos

1)can u create internal table dynamically ?how?

2)what is the model dialogbox?

3)can u create more than one selectionscreen

4)in which event we will be writing authorization object.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
5 REPLIES 5

Former Member
0 Kudos

<b>1)can u create internal table dynamically ?how?</b>

Yes we can create

wa_fieldcatalog-fieldname  = 'FIELD1'.
  wa_fieldcatalog-ref_table  = 'E070'.
  wa_fieldcatalog-outputlen  = '13'.
  wa_fieldcatalog-reptext    = 'Created On'.
  wa_fieldcatalog-seltext    = 'Created On'.
  APPEND wa_fieldcatalog TO it_fieldcatalog.
  CLEAR wa_fieldcatalog.
  
  wa_fieldcatalog-fieldname  = 'FIELD1'.
  wa_fieldcatalog-ref_table  = 'E070'.
  wa_fieldcatalog-outputlen  = '13'.
  wa_fieldcatalog-reptext    = 'Created On'.
  wa_fieldcatalog-seltext    = 'Created On'.
  APPEND wa_fieldcatalog TO it_fieldcatalog.
  CLEAR wa_fieldcatalog.


  LOOP AT it_mandt WHERE mandt IN s_mandt.
    CONCATENATE 'CLNT' it_mandt INTO wa_fieldcatalog-fieldname.
    wa_fieldcatalog-inttype    = 'NUMC'.
    wa_fieldcatalog-outputlen  = '14'.
    wa_fieldcatalog-reptext    = it_mandt.
    wa_fieldcatalog-seltext    = it_mandt.

    APPEND wa_fieldcatalog TO it_fieldcatalog.
    CLEAR :wa_fieldcatalog ,it_mandt.
  ENDLOOP.
   ********CREATE DYNAMIC TABLE************************

  CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING
      it_fieldcatalog           = it_fieldcatalog
    IMPORTING
      ep_table                  = new_table
    EXCEPTIONS
      generate_subpool_dir_full = 1
      OTHERS                    = 2.
  IF sy-subrc <> 0.
*  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

  ASSIGN new_table->* TO <it_final>.

<b>2)what is the model dialogbox?</b>

when we select the attribute modal dialog box when creating a screen, the screen will be displayed as popup

<b>3)can u create more than one selectionscreen</b>

We cannot create more than 1 selection screen

<b>4)in which event we will be writing authorization object.</b>

INITIALIZATION event

Former Member
0 Kudos

Hi

1)can u create internal table dynamically ?how?

Dynamic internal table is internal table that we create on the fly with flexible column numbers.

For sample code, please look at this code tutorial. Hopefully it can help you

Check this link:

http://www.saptechnical.com/Tutorials/ABAP/DynamicInternaltable/DynamicInternalTable.htm

2)what is model dialog box?

Go to SE51 and create the model dialog box and see.

It is like creating the screen.

3)can u create more than one selectionscreen

Why do you need more than one selection screen for a program,One is enough .

4)in which event we will be writing authorization object.

In general different users will be given different authorizations based on their role in the orgn.

We create ROLES and assign the Authorization and TCODES for that role, so only that user can have access to those T Codes.

USe SUIM and SU21 T codes for this.

Much of the data in an R/3 system has to be protected so that unauthorized users cannot access it. Therefore the appropriate authorization is required before a user can carry out certain actions in the system. When you log on to the R/3 system, the system checks in the user master record to see which transactions you are authorized to use. An authorization check is implemented for every sensitive transaction.

If you wish to protect a transaction that you have programmed yourself, then you must implement an authorization check.

This means you have to allocate an authorization object in the definition of the transaction.

For example:

program an AUTHORITY-CHECK.

AUTHORITY-CHECK OBJECT <authorization object>

ID <authority field 1> FIELD <field value 1>.

ID <authority field 2> FIELD <field value 2>.

...

ID <authority-field n> FIELD <field value n>.

The OBJECT parameter specifies the authorization object.

The ID parameter specifies an authorization field (in the authorization object).

The FIELD parameter specifies a value for the authorization field.

The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.

http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm

To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.

Authorization : An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values.

You program the authorization check using the ABAP statement AUTHORITY-CHECK.

AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'

ID 'ACTVT' FIELD '02'

ID 'CUSTTYPE' FIELD 'B'.

IF SY-SUBRC <> 0.

MESSAGE E...

ENDIF.

'S_TRVL_BKS' is a auth. object

ID 'ACTVT' FIELD '02' in place 2 you can put 1,2, 3 for change create or display.

The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.

This Authorization concept is somewhat linked with BASIS people.

As a developer you may not have access to access to SU21 Transaction where you have to define, authorizations, Objects and for nthat object you assign fields and values. Another Tcode is PFCG where you can assign these authrization objects and TCodes for a profile and that profile in turn attached to a particular user.

Take the help of the basis Guy and create and use.

In general different users will be given different authorizations based on their role in the orgn.

We create ROLES and assign the Authorization and TCODES for that role, so only that user can have access to those T Codes.

USe SUIM and SU21 T codes for this.

Much of the data in an R/3 system has to be protected so that unauthorized users cannot access it. Therefore the appropriate authorization is required before a user can carry out certain actions in the system. When you log on to the R/3 system, the system checks in the user master record to see which transactions you are authorized to use. An authorization check is implemented for every sensitive transaction.

If you wish to protect a transaction that you have programmed yourself, then you must implement an authorization check.

This means you have to allocate an authorization object in the definition of the transaction.

For example:

program an AUTHORITY-CHECK.

AUTHORITY-CHECK OBJECT <authorization object>

ID <authority field 1> FIELD <field value 1>.

ID <authority field 2> FIELD <field value 2>.

...

ID <authority-field n> FIELD <field value n>.

The OBJECT parameter specifies the authorization object.

The ID parameter specifies an authorization field (in the authorization object).

The FIELD parameter specifies a value for the authorization field.

The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.

http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm

To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.

Authorization : An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values.

You program the authorization check using the ABAP statement AUTHORITY-CHECK.

AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'

ID 'ACTVT' FIELD '02'

ID 'CUSTTYPE' FIELD 'B'.

IF SY-SUBRC <> 0.

MESSAGE E...

ENDIF.

'S_TRVL_BKS' is a auth. object

ID 'ACTVT' FIELD '02' in place 2 you can put 1,2, 3 for change create or display.

The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.

This Authorization concept is somewhat linked with BASIS people.

As a developer you may not have access to access to SU21 Transaction where you have to define, authorizations, Objects and for nthat object you assign fields and values. Another Tcode is PFCG where you can assign these authrization objects and TCodes for a profile and that profile in turn attached to a particular user.

Take the help of the basis Guy and create and use.

In general different users will be given different authorizations based on their role in the orgn.

We create ROLES and assign the Authorization and TCODES for that role, so only that user can have access to those T Codes.

USe SUIM and SU21 T codes for this.

Much of the data in an R/3 system has to be protected so that unauthorized users cannot access it. Therefore the appropriate authorization is required before a user can carry out certain actions in the system. When you log on to the R/3 system, the system checks in the user master record to see which transactions you are authorized to use. An authorization check is implemented for every sensitive transaction.

If you wish to protect a transaction that you have programmed yourself, then you must implement an authorization check.

This means you have to allocate an authorization object in the definition of the transaction.

For example:

program an AUTHORITY-CHECK.

AUTHORITY-CHECK OBJECT <authorization object>

ID <authority field 1> FIELD <field value 1>.

ID <authority field 2> FIELD <field value 2>.

...

ID <authority-field n> FIELD <field value n>.

The OBJECT parameter specifies the authorization object.

The ID parameter specifies an authorization field (in the authorization object).

The FIELD parameter specifies a value for the authorization field.

The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.

http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm

To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.

Authorization : An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values.

You program the authorization check using the ABAP statement AUTHORITY-CHECK.

AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'

ID 'ACTVT' FIELD '02'

ID 'CUSTTYPE' FIELD 'B'.

IF SY-SUBRC <> 0.

MESSAGE E...

ENDIF.

'S_TRVL_BKS' is a auth. object

ID 'ACTVT' FIELD '02' in place 2 you can put 1,2, 3 for change create or display.

The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.

This Authorization concept is somewhat linked with BASIS people.

As a developer you may not have access to access to SU21 Transaction where you have to define, authorizations, Objects and for nthat object you assign fields and values. Another Tcode is PFCG where you can assign these authrization objects and TCodes for a profile and that profile in turn attached to a particular user.

Take the help of the basis Guy and create and use.

Reward points if useful

Regards

Anji

Message was edited by:

Anji Reddy Vangala

former_member223537
Active Contributor
0 Kudos

1. Yes

/people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap

2. A dialog box which you can't skip. You need to answer YES/NO. There is no CLOSE button on the box

3. Yes, Sub-screens & Dynamic selection screens are a part of it

4. START-OF-SELECTION.

Former Member
0 Kudos

1)can u create internal table dynamically ?how?

Yes and see the below example program

TABLES LVC_S_FCAT.

DATA IT_FIELDCATALOG TYPE LVC_T_FCAT.

DATA: DYN_TABLE TYPE REF TO DATA,

WA TYEP REF TO DATA.

FIELD-SYMBOLS: <MY_TABLE> TYPE TABLE,

<WA> TYPE ANY.

..........

  • define the structure of internal

LOOP AT ITAB.

LVC_S_FCAT-COL_POS = POS.

LVC_S_FCAT-FIELDNAME = ITAB-MERKNR

LVC_S_FCAT-SCRTEXT_S = ..... label of field

................

  • See the structure (in SE11) LVC_S_FCAT you can find all parameter to define a field: data type, length....

  • Inserisci tutto i dati restanti (dimensioni etc.

APPEND LVC_S_FCAT TO IT_FIELDCATALOG.

POS = POS + 1.

ENDLOOP.

CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE

EXPORTING

IT_FIELDCATALOG = IT_FIELDCATALOG

IMPORTING

EP_TABLE = DYN_TABLE.

ASSIGN DYN_TABLE->* TO <MY_TABLE>.

  • header line

CREATE DATA WA LIKE LINE OF <T_OUTPUT>.

ASSIGN WA->* TO <WA>.

2)what is the model dialogbox?

modal dialog box is the one type of screen which we will maintain for pop up screen like f1 help ,f4 value

3)can u create more than one selectionscreen

yes

4)in which event we will be writing authorization object.

at selection-screen

Reward Points if it is helpful

Thanks

Seshu

Former Member
0 Kudos