Exception "NO AUTHORIZATION" in FM "RH_INSERT_INFTY"
Hi all,
My requirement is to create the Infotypes by simulating the PP01 transaction. I used the FM RH_INSERT_INFTY. I am able to create the OBJECT Infotype and ADDRESS Infortype. But, When i am trying to create the Reletionship Infotype with Relation type A002. It is returning an exception as "NO AUTHORIZATION" and created an Infotype with relation B027, which i did ot ask for.
Does creation of Relationship needs any authorization?. Please help me out in this...
It would be gr8 help......
Thanks & Best Regards,
Vishnu
Hi,
After getting the no-authorization error, go to transaction SU53 and there u can see what authorization object is needed .you can take the snapshot of the SU53 and tell the basis consultant to give the particular authorization object to ur user.
regards,
Santosh Thorat
Similar Messages
-
Boolean Authorization No Data Found
Hello, I am trying to create a PL/SQL function returning Boolean to allow new contacts to sign up with a blank form and nothing in session state using a list entry on page 1 targeting page 2, or to edit existing contact information by clicking a link in an email sent to them with their ID in the link. They are required to enter their email address so that noone can "steal" their ID. Everything works except the authorization scheme.
I get ORA-01403: no data found Error ERR-1082 Error in executing authorization scheme code. OK. I suppose it is because the select statement returns no rows. I know this is basic stuff. Can someone please help me with the syntax? I really appreciate it.
declare
v_id number;
begin
select id into v_id from contacts
where id=:P2_ID and e_mail_address=:P2_SECURITY_CHECK;
if :P2_ID is null then
return true;
elsif :P2_ID is not null
and :P2_ID=v_id then
return true;
else return false;
end if;
end;
PeterSo add an exception just before your end statement:
exception
when no_data_found the return true; -- or false whatever you want -
Invalid authorization specification, message from server
I am new to JDBC, and Java. I'm trying to connect MYSQL database with the following code, i compiled and execute jdbcExample (using JCreator). It giving me this error:
Exception: Invalid authorization specification, message from server: "Access denied for user: '[email protected]' (Using password: YES)". I have full access granted to the mydb database. Please advise. Thanks!!
package BeanDir;
import java.sql.*;
public class jdbcExample {
public static void main(String args[]) {
Connection con = null;
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql://myintranet/mydb?user=slai&password=mypasswd");
if(!con.isClosed())
System.out.println("Successfully connected to MySQL server...");
} catch(Exception e) {
System.err.println("Exception: " + e.getMessage());
} finally {
try {
if(con != null)
con.close();
} catch(SQLException e) {}When setting up users it is possible to restrict access by ip. You may have full priviledges as 'slai@localhost" but not as '[email protected]' . Check the user tables and see.
-
SAP_ALL except STMS?
If it possible to create a role with SAP_ALL authorization except STMS authorization?
Hi
Yes, you would be able to restict the access STMS by giving SAP_ALL.
1. Enter PFCG
2. Give the role name and create the role
3. Do not enter any transactions in Menu
4. Save the Role
5. In Authorisation tab click Expert Mode and there will be a pop up of template.
6. Choose the template SAP_ALL and then click on Adopt Reference.
7. Click Yes for Insert all Authorisation
8. Message appears " Authorisations Added with complete Information"
9. Identify the objects associated with STMS
S_BTCH_ADM Background Processing: Background Administrator
S_BTCH_JOB Background Processing: Operations on Background Jobs
S_CTS_ADMI Administration Functions in Change and Transport System
S_DATASET Authorization for file access
S_DEVELOP ABAP Workbench
S_RFC Authorization Check for RFC Access
S_RZL_ADM CCMS: System Administration
S_TRANSPRT Transport Organizer
10. Before you generate the role disable the above authorisation objects except S_DATASET, S_RFC and S_RZL_ADM (if you are not using CCMS).
11. Generate the role and test it out. This works...
I have tested it successfully.
Thanks and Regards
Arun R -
Tutorial: Issue Tracker, Problem with Authorization
Hi All,
I just worked through the Issue Trackin System Tutorial, everything looks great except the Authorization. I did the Tutorial on our local Instance of HTMLDB so I had to modify the Authorization Schemes a little. People should login using their internal HTMLDB-Account, which uses an extra loginname, not the email adress. So i added a column PERSON_LOGIN to the ht_people table which holds the userID. My Authorizationscheme looks like this:
select '1' from ht_people where
(upper(PERSON_LOGIN) = upper(:APP_USER) and
PERSON_ROLE in ('Lead','Member') and
ASSIGNED_PROJECT = :P7_RELATED_PROJECT)
or (:APP_USER = 'HOWTO')
or (:P7_ISSUE_ID is null)
This Scheme simply does not work, the user does not get the authorization to edit the issues assigned to him. I can´t see the problem, if I do this query I get the expected column back. If I log in to the Application and try to edit the issues, I don´t get the neccesary authorization. Any Ides ?From Scott -
I installed that demo app on our hosted site. I don't see anything structurally wrong with page 0 breadcrumbs. When you edit page 0, do you see the correct menu region, or is there a big number where its name should be? If you find something that you cannot repair, please let us know.
As for the authorization schemes, I see what's going on. The scheme controls the display of buttons and a region on page 7 and is evaluated during the rendering of the region and the buttons. These events take place before the item P7_RELATED_PROJECT is rendered, thus before its session state is established or altered during that page view. However the implementation of the authorization scheme references the current session state of that item. That won't work. Using standard conditions (vs. authorization schemes) to control the buttons/regions that are earlier on the page than the referenced item would have the same problem if they used the same logic. For situations like this, LOVs that submit the page and result in a branch back to the same page can be very useful, or splitting the page into multiple pages, as in wizard implementations, can also work.
From Sharon -
I want to thank you for pointing out this bug. This is our first tutorial document and a lot of time was spent making sure that users could follow the directions and learn how to create all the objects that make up an application. Obviously, not enough time was spent testing the resultant application. The statement below should work for the Authorization Scheme in question.
select '1'
from ht_people
where (person_email = :APP_USER and
person_role in ('Lead','Member') and
assigned_project = (select related_project
from ht_issues
where issue_id = :P7_ISSUE_ID))
or (:APP_USER = 'HOWTO')
or (:P7_ISSUE_ID is null)
You will notice that is allows the modification of the issue by either the Lead or any Member of the project, not just the one assigned. When I update the document and repost on OTN, I will make a note of that.
This checks that the current value of related project is the project that the Member or Lead is assigned to. It is true that while viewing the page, the user can change the related project. Once the change is applied, they would no longer be able to edit that issue. -
One Apple ID used for two people's iPhones-what to do now?
My Dad bought an iPhone 3G when it came out and, naturally, used his Apple ID for his purchases. When the 3GS came out, he upgraded and gave the 3G to my mom. Since she doesn't sync the iPhone with a computer, she's never made her own Apple ID.
I'm wondering what the best course of action is, since she's bought quite a few apps using my Dad's account and wouldn't want to have to repurchase them if she created her own account. Is there any way to transfer certain apps?
On that note, she recently got herself a nice MacBook Pro. Her iPhone 3G used to be synced to my Dad's old iBook, so I take it there's no way to start syncing her iPhone 3G with her MacBook Pro without restoring it? Thanks for your help!Authorize her computer with my dad's account meaning that she would be able to continue using his Apple ID and the apps she purchased with it
Yes. She does not need to use his iTunes ID at all except to authorize her computer (since she purchased apps with his iTunesID).
while syncing her iPhone with her MacBook Pro?
Yes. In order to use the apps she purchased under his iTunes ID, on her own computer, it needs to be authorized for his iTunes ID.
She can the use her own iTunes ID to make any further purchases.
I guess it's nice to have that option (if I understood correctly), but I like your suggestion to just start fresh.
She not really "starting fresh" as such.
She is simply creating her own account and copying the stuff she purchased from the other computer.
Authorize iTunes on her own computer then plug in the iPhone and File -> Transfer purchases to get these itmes into her own iTunes. -
Invalid Password even though it's valid
Hi,
Everybody, I've recently deployed an application in Websphere and HTTPServer and have Oracle on the DB back-end. I've followed deployment instructions and assigned libraries to ear and war files of an application, my EJB's seems to be targeted right path and JDBC connection Tests sucessfully. Before deploying application for Websphere I've configured my config files and xml files to meet right path, and then installed an instance from ear file which got uploaded to Websphere. My question is I'm getting to the login page from HTTPServer and unable to login with existing user in a DB for an application it throws me an "INVALID PASSWORD" message, once clicking on Forgot Password Link it throws me an Java exception for Authorizer, is it an application error message or configurations of an application were setup incorrently with a DB? There's an instance to it, I've had that application up and running with several internal bugs to it which were allocated in the middle of a user-session, but @ least at some point I was able to successfully login, now I'm not even getting threw after redeployment...Once more thing, my application server doesn't show any visuals that our application has on the login page whereas HTTPServer has all of them, how would I got about it, I've copied and pasted my webroot folder to a default application path directory... If anybody can get back to me with this problem I would greatly appreciate it.
Thank you,
TimI've recently deployed an application in Websphere and HTTPServer and have Oracle on the DB back-end. Tim, apparently your login problem happens inside the Websphere. You will have a better chance to ask this question in IBM's forums.
-
Bug in SET_SELECTION_STATE_BY_BINDING?
-My apologies, the previously entered problemdiscription was incorrect-
We have a webtemplate with a query and three buttons, "Alter selection" (a call to OPEN_VARIABLE DIALOG and SET_SELECTION_STATE_BY_BINDING), u201CChecku201D and "Save" (both are planningsequences). The query contains a filter with a variable and this filter is also used in the planningsequences.
When the webtemplate is executed, the variable must be filled in first, after which the queryresult is presented (save button is inactive). The user presses u201CChecku201D which calls a planning function of a self defined-functiontype. (If the check is succesful the save button becomes available, if the check is not correct the button remains inactive). This was previously programmed in FOX, but on advise of SAP, it was reprogrammed to a function type. This works great.
When the button u201CAlter Selectionu201D is pressed to change the variable and so alter the selection, the new queryresult is shown. This result seems to correctly reflect that a change has been made. On purpose, the filter is changed so the check should produce an error, this second time. But when the u201Cchecku201D button is pressed again, the error is not there.
The same goes for the opposite: start off with a bad selection and an error occurs. Alter the selection by entering a different value in the variables to produce a correct result, and the check still produces an error.
Somehow it seems that SET_SELECTION_STATE_BY_BINDING is propagating the new values to the selected dataprovider, but not to the dataset the ABAP-check in the functiontype can u2018seeu2019.
Does anybody has a clue?
Edited by: B. Finance on Aug 20, 2009 1:53 PMHi Matthias,
Thank you for your reply.
The filter was created in the Modeler and in Query Designer it was then drag-dropped into the filter-section. Here we also added a few characteristics for authorization reasons. And ofcourse, for the planningsequence the excact same filter is used.
The binding arguments are for the Dataprovider and all the variables as stated in the Query Designer are bound here, except the authorization variables. (I basically have SAP_ALL, so I ruled out authorization problems).
Could it be the varaiables aren't bound the right way? -
Hi all guru
I have some questions confused me. Is dms built-in in the ecc 6.0 ? If I don't buy cfolder or others ,
could I store my document ,such as PR attachment , into the sap server filesystem , not windows mount driver? By windows driver , each user has to setup the environment and there are some permission issues. Is those correct ?
I don't believe sap 's built-in document solution is like that ,but my basis consultant told me that the fact is. If I want to put those document into sap filesystem or another storage system which no one could access directly , is it possible ?
Thanks.Hi,
Yes, DMS is a part of ECC 6.0 as other modules like MM,SD etc..
there is no need of storing attachments in windows drive..specially for DMS, content server is recommended because of its more handling of documents.
for storage, separate content server can be configured where you can store all the documents (attachments).
content server authorizations will be as per the roles and access provided for storing documents, all the users wont be having any access except provided authorizations are given.
Thank You,
Manoj
pls consider points if useful..!! -
Error in Exchange Rate transfer useing program RFALEX00.
Hi All,
We are trying to ALE the Exchange rate from one system to another.
We are using program RFALEX00. The Idoc generated in host system is successfull where as in target system it's getting in to Error saying "No maintenance authorization for requested data (SV- 052 Message type)".
I can load the exchange rate manually it will not throw any exception regrding Authorization.
Could you please guide on this.
Your help is really appreciated
Regards,
Ravi KasnaleDifference between authorizations for your userid and the userid that is processing the ALE (maybe WF-BATCH or something like that) may be the cause.
-
Hi All,
Scenario: .Net <> XI <> SAP CRM (Synchronous call)
In this scenario, I am passing an URL string from XI to importing parameter of RFC (SAP CRM), which should pick the file, based on the URL string passed and save the attachment in CRM.
When I try to pass the URL string from Test Interface of RFC, it saves an attachment in CRM, but when I am passing the same URL string from XI to importing parameter of RFC, it is giving me response as attachment failed.
Later I did the Debug to understand whether the URL string which I was passing was correct or not. But to my surprise, while doing Debug, it saved the attachment in CRM.
Could anybody help me on resolving this problem.
Thanks in Advance
Ashish.hi,
what you need to do it to try debugging
your scenario with real message
have a look at those two weblogs:
/people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios
- from me
/people/sravya.talanki2/blog/2006/02/28/simulating-xi-messages-proto - from Sravya Talanki
you also mention that you've tried debugging
did you do it like this?
/people/michal.krawczyk2/blog/2006/01/17/xi-debugging-rfc-calls-from-the-xi-not-possible-who-said-that-
if you use this method you can be sure that
you'll get the same results (except for authorization)
as with the call from XI
BTW
you're not using any BAPI or anything
that needs to be commited explicitly ?
these might help you to debug your scenario
even better as it's not possible that once it works
and once it doesn't
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a> -
Hi
Has any one tried out sending notifications using notification service using OIM 11g?
When I am trying to send notification I am seeing exception like
oracle.iam.notification.exception.TemplateNotFoundException: Cannot find the template.
at oracle.iam.notification.template.TemplateServiceImpl.lookupTemplate(TemplateServiceImpl.java:512)
when I submit a request as an administrator for others.
and I am seeing
oracle.iam.notification.exception.NotificationManagementException: Authorization check failed for LOOKUP Operation for user jon.doe.
at oracle.iam.notification.impl.NotificationServiceImpl.lookupTemplate(NotificationServiceImpl.java:256)
When I submit a request for self.
Sample code:
event = new NotificationEvent(eventId.toString(), userIds,
null, "Request Creation",
"To be sent during a request creation",
"NOTIFICATIONADMIN", values,*
reqInfo.getCreationDate(), reqInfo.getEndDate());
System.out.println("Notification event constructed successfully");
NotificationTemplate templ = notifSer.lookupTemplate("Request Creation", Locale.ENGLISH);System.out.println("template found="+templ.getEventname());
boolean notifyStatus = notifSer.notify(event);
Regards
user12841694I found the problem and fixed it. For the benefit of others, here was the problem.
The CS workflow notification service had suddently stopped about two months back. We found the root cause as the email address not being stored in the workflow's DSPerson database table. The email id was properly populated in portal database.
On checking the User Profile Manager I found that the user's Email field was mapped to 'email' property instead of 'Email' property (yea, it is case-sensitive). Rectifying the mapping and running the hot sync (<PTWorkflow Install>\bin\hotsync.bat) migrated the email addresses to workflow database and notification emails started being sent out.
Jignesh -
Hi Guys,
Do you know is there any difference between creating the ORG Structue in tranaction in PPOCE and PPOCA ....
thankx
shreeThere is no difference except for authorizations..
Suresh Datti
Message was edited by: Suresh Datti -
Error while running FM 'CS_BOM_EXPL_MAT_V2'
Hi.
While executing the FM 'CS_BOM_EXPL_MAT_V2' the FM is given me an exception 'MISSING authorization. the sy-subrc eq 4. What cud b the reason?Check the below FM and I used like this :
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
capid = 'PP01'
datuv = sy-datum
mktls = 'X'
mehrs = 'X'
mtnrv = t_mast-matnr
stlal = '01'
stlan = '1'
stpst = 0
svwvo = 'X'
werks = p_werks
vrsvo = 'X'
TABLES
stb = t_stb
matcat = t_matcat
EXCEPTIONS
alt_not_found = 1
call_invalid = 2
material_not_found = 3
missing_authorization = 4
no_bom_found = 5
no_plant_data = 6
no_suitable_bom_found = 7
conversion_error = 8
OTHERS = 9.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
For more information check the below program :
TABLES: mast,
stko,
stpo,
T418,
makt.
TYPE - POOLS
TYPE-POOLS: slis.
Constants
constants : c_tcode(4) type c value 'CS03',
gc_formname_top_of_page TYPE slis_formname
VALUE 'TOP_OF_PAGE'.
Variables
data : v_maktx like makt-maktx,
wa_stko like stko.
DATA:
Objekttyp 'Material'
otyp_mat(1) TYPE c VALUE '1',
ootyp_mat(1) TYPE c VALUE 'M',
Objekttyp 'kein Objekt'
otyp_noo(1) TYPE c VALUE '2',
Objekttyp 'Dokument'
otyp_doc(1) TYPE c VALUE '3',
Objekttyp 'Klasse'
otyp_kla(1) TYPE c VALUE '4',
Objekttyp 'Intramaterial'
otyp_ntm(1) TYPE c VALUE '5'.
maximal anzeigbare Menge
data: max_num(7) TYPE p DECIMALS 3 VALUE '9999999999.999',
ueberl_kz(1) TYPE c VALUE '*',
min_num(7) TYPE p DECIMALS 3 VALUE '9999999999.999-',
b_flag(1) TYPE c VALUE 'X',
ecfld(250) TYPE c,
v_flag type c.
ALV Variables
DATA: gt_fieldcat TYPE slis_t_fieldcat_alv,
gs_layout TYPE slis_layout_alv,
gs_keyinfo TYPE slis_keyinfo_alv,
gt_sp_group TYPE slis_t_sp_group_alv,
gt_events TYPE slis_t_event.
DATA: g_repid LIKE sy-repid.
DATA: gt_list_top_of_page TYPE slis_t_listheader,
g_tabname_header TYPE slis_tabname,
g_tabname_item TYPE slis_tabname,
g_save(1) TYPE c,
gx_variant LIKE disvariant,
g_variant LIKE disvariant,
g_default(1) TYPE c,
g_exit(1) TYPE c.
Includes *
INCLUDE .
Internal Table Declaration *
DATA: t_mast LIKE STANDARD TABLE OF mast WITH HEADER LINE.
*DATA: t_makt LIKE STANDARD TABLE OF makt WITH HEADER LINE.
BOM Function module Related
DATA: t_matcat LIKE cscmat OCCURS 0 WITH HEADER LINE.
Internal Table for Level by Level Function module
DATA: t_stb LIKE stpox OCCURS 0 WITH HEADER LINE.
Get the Relevant data from FM
DATA: BEGIN OF hd_tab OCCURS 0,
stufe LIKE stpox-stufe,
vwegx LIKE stpox-vwegx,
END OF hd_tab.
Final Output
DATA: BEGIN OF alv_stb OCCURS 0.
INCLUDE STRUCTURE stpox_alv.
DATA: info(3) TYPE c,
END OF alv_stb.
DATA: BEGIN OF stb_orig.
INCLUDE STRUCTURE stpox.
DATA: END OF stb_orig.
DATA: BEGIN OF stb_add.
INCLUDE STRUCTURE stpol_add.
DATA: END OF stb_add.
Internal Table for STPO
*-- BOM Line item
TYPES: BEGIN OF ty_stpo,
stlty TYPE stpo-stlty,
stlnr TYPE stpo-stlnr,
stlkn TYPE stpo-stlkn,
stpoz TYPE stpo-stpoz,
idnrk TYPE stpo-idnrk,
meins TYPE stpo-meins,
menge TYPE stpo-menge, "Component Qty
END OF ty_stpo.
DATA: t_stpo TYPE STANDARD TABLE OF ty_stpo WITH HEADER LINE.
*-- BOM Header
TYPES: BEGIN OF ty_stko,
stlty TYPE stko-stlty,
stlnr TYPE stko-stlnr,
stlal TYPE stko-stlal,
stkoz TYPE stko-stkoz,
bmein TYPE stko-bmein,
bmeng TYPE stko-bmeng,
END OF ty_stko.
DATA: t_stko TYPE STANDARD TABLE OF ty_stko WITH HEADER LINE .
data : t_makt like makt occurs 0 with header line.
DATA: BEGIN OF cl_clstab OCCURS 0, "YHG079407
class LIKE klah-class, "YHG079407
klart LIKE klah-klart, "YHG079407
chked LIKE csdata-xfeld, "YHG079407
noobj LIKE csdata-xfeld, "YHG079407
dsply LIKE csdata-xfeld, "YHG079407
END OF cl_clstab.
*-- Header table
TYPES: BEGIN OF ty_main_material,
matnr TYPE mast-matnr, "Material
werks TYPE mast-werks, "Plant
maktx TYPE makt-maktx, "Description
stlal TYPE mast-stlal, "Alternative BOM
stlnr TYPE stko-stlnr, "BOM Number
bmein TYPE stko-bmein, "UOM
bmeng TYPE stko-bmeng, "Base Qty
expand(1) TYPE c, "Expanding Field
END OF ty_main_material.
DATA: t_main_material TYPE STANDARD TABLE OF ty_main_material WITH
HEADER LINE.
*-- Item (Component) Table
TYPES: BEGIN OF ty_item_material,
matnr TYPE mast-matnr, "Material
werks TYPE mast-werks, "Plant
idnrk TYPE stpo-idnrk, "Component (Material)
maktx TYPE makt-maktx, "Description
stlal TYPE mast-stlal, "Alternative BOM
stlnr TYPE stpo-stlnr, "BOM Number
meins TYPE stpo-meins, "UOM
menge TYPE stpo-menge, "Base Qty
END OF ty_item_material.
DATA: t_item_material TYPE STANDARD TABLE OF ty_item_material WITH
HEADER LINE.
Selection Screen *
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_werks LIKE marc-werks DEFAULT '1000' OBLIGATORY.
SELECT-OPTIONS s_stlal FOR mast-stlal .
SELECT-OPTIONS s_stlan FOR mast-stlan DEFAULT '1'.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
SELECTION-SCREEN SKIP.
PARAMETERS: p_bomlst RADIOBUTTON GROUP g1 DEFAULT 'X'.
SELECT-OPTIONS s_matnr FOR mast-matnr.
SELECTION-SCREEN SKIP.
PARAMETERS: p_compon RADIOBUTTON GROUP g1.
SELECT-OPTIONS: s_idnrk FOR stpo-idnrk.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN END OF BLOCK b1.
selection-screen begin of block b03 with frame title text-b03.
selection-screen begin of line.
selection-screen comment 1(40) text-005.
parameters: p_all radiobutton group r1 default 'X'.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 1(40) text-006.
parameters: p_one radiobutton group r1 .
selection-screen end of line.
selection-screen end of block b03.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
PARAMETERS: p_vari LIKE disvariant-variant.
SELECTION-SCREEN END OF BLOCK b3.
At slection screen events *
*-- Process on value request
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
PERFORM f4_for_variant.
Intitialisation
INITIALIZATION.
g_repid = sy-repid.
g_tabname_header = 'T_MAIN_MATERIAL'.
g_tabname_item = 'T_ITEM_MATERIAL'.
*-- define keyinformation
CLEAR gs_keyinfo.
gs_keyinfo-header01 = 'MATNR'.
gs_keyinfo-item01 = 'MATNR'.
PERFORM e03_eventtab_build USING gt_events[].
PERFORM e04_comment_build USING gt_list_top_of_page[].
PERFORM e07_sp_group_build USING gt_sp_group[].
PERFORM e08_layout_build USING gs_layout.
Set Options: save variants userspecific or general
g_save = 'A'.
PERFORM variant_init.
Get default variant
gx_variant = g_variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = g_save
CHANGING
cs_variant = gx_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
p_vari = gx_variant-variant.
ENDIF.
S T A R T - O F - S E L E C T I O N *******************
start-of-selection.
if p_all = 'X'.
Get the data from MAST and MAKT Table
if p_bomlst = 'X'.
Get the data Based On Material #
perform get_data.
else.
Get the data Based On Component
perform get_data_component.
endif.
else.
Get the Single Level Report
*-- Moved the fiedl catalog here inorder to change the layout based on
*-- Selection
PERFORM e01_fieldcat_init USING gt_fieldcat[].
PERFORM select_data.
endif.
E N D - O F - S E L E C T I O N *******************
end-of-selection.
if p_one = 'X'.
perform alv.
endif.
User Command
at line-selection.
Interactive to CS03 Transaction
case sy-ucomm.
when 'PICK' or 'F2'.
if not alv_stb-idnrk is initial .
if not alv_stb-werks is initial.
if not alv_stb-objty is initial.
SET PARAMETER ID 'MAT' FIELD alv_stb-idnrk.
SET PARAMETER ID 'WRK' FIELD alv_stb-werks.
SET PARAMETER ID 'CSV' FIELD alv_stb-OBJTY.
call transaction c_tcode and skip first screen.
endif.
endif.
endif.
clear alv_stb.
endcase.
*& Form get_data
Get data from MAST and MAKT Table
FORM get_data.
data : wa_lines type sy-index.
REFRESH : T_MAST,
t_STB,
t_MATCAT,
alv_STB.
CLEAR : T_MAST,
t_STB,
t_MATCAT,
alv_STB.
Get the data from MAST Table
Get all the information from MAST - BOM Table
SELECT * FROM mast INTO TABLE t_mast WHERE matnr IN s_matnr AND
werks = p_werks AND
stlan IN s_stlan AND
stlal IN s_stlal.
describe table t_mast lines wa_lines.
if wa_lines is initial.
Write:/2 'List contains no data'.
stop.
endif.
loop at t_mast.
clear : v_maktx.
Start of change Seshu
Reason - Remove the new page option
if sy-tabix ne 1.
skip 1.
endif.
End of Change Seshu
Get the material Description
select single maktx from makt into v_maktx
where matnr = t_mast-matnr
and spras = 'E'.
Get the material details from STKO Table
select single * from stko into wa_stko
where STLTY = 'M'
and STLNR = t_mast-stlnr
and STLAL = t_mast-stlal.
Main Header for Each Material
format color 5 on.
write:/2 'Material',20 'Material Description',65 'Alternative BOM',
90 'Base Qty', 115 'Base Unit'.
format color 5 off.
format color 1 on.
write:/2 t_mast-matnr,20 v_maktx,65 wa_stko-STLAL, 85 wa_stko-BMENG,
115 wa_stko-BMEIN.
format color 1 off.
Use the Function Module and get the format level by level
perform get_level_level.
endloop.
ENDFORM. " get_data
Top of page *
top-of-page.
perform report_header .
*& Form report_header
text
--> p1 text
<-- p2 text
FORM report_header.
new-page line-size 160 .
format color col_heading intensified on.
write:/ sy-uline(160) .
*--- Write Company Name.
perform calc_col_and_write using text-h00
sy-linsz.
*--- Write Report Title.
perform calc_col_and_write using sy-title
sy-linsz.
*--- Write User Id, Date / Time, Program Id, Page etc.
perform write_other_hdr_details.
write:/ sy-uline(160) .
ENDFORM. " report_header
*& Form calc_col_and_write
text
-->P_TEXT_H00 text
-->P_SY_LINSZ text
FORM calc_col_and_write USING P_TEXT
P_LINSZ.
data: col1 type i,
col2 type i,
len type i,
str type i.
str = strlen( p_text ).
col1 = ( p_linsz / 2 ) - ( str / 2 ) .
len = p_linsz - col1 - 2.
write: at /1 '|'.
write: at col1 p_text,
at sy-colno(len) space.
write at 160 '|'.
ENDFORM. " calc_col_and_write
*& Form write_other_hdr_details
text
--> p1 text
<-- p2 text
FORM write_other_hdr_details.
data: col1 type i,
col2 type i,
len type i.
col1 = 3.
write:/1 '|'.
write: at col1 'UserId : ',
sy-uname.
len = sy-linsz - 1.
write at sy-colno(len) space.
col2 = sy-linsz - 18.
write: at col2 'Date: ',
sy-datum mm/dd/yyyy.
write: at sy-linsz '|'.
write:/1 '|'.
write: at col1 'ReportId: ',
sy-repid.
write at sy-colno(len) space.
col2 = sy-linsz - 18.
write: at col2 'Page: ',
sy-pagno.
write: at sy-linsz '|'.
ENDFORM. " write_other_hdr_details
*& Form get_data_component
Get the data based on Component level
FORM get_data_component.
data wa_lines type i.
*-- Get the BOM item details
SELECT stlty stlnr stlkn stpoz idnrk meins menge
FROM stpo
INTO TABLE t_stpo
WHERE idnrk IN s_idnrk.
IF sy-subrc = 0.
CLEAR wa_lines.
DESCRIBE TABLE t_stpo LINES wa_lines.
IF wa_lines > 0.
SELECT stlty stlnr stlal stkoz bmein bmeng
FROM stko
INTO TABLE t_stko
FOR ALL ENTRIES IN t_stpo
WHERE stlnr = t_stpo-stlnr.
CLEAR wa_lines.
DELETE ADJACENT DUPLICATES FROM t_stko COMPARING ALL FIELDS.
DESCRIBE TABLE t_stko LINES wa_lines.
IF wa_lines > 0.
*-- Get the BOM item details
SELECT * FROM mast INTO TABLE t_mast FOR ALL ENTRIES IN t_stko
WHERE werks = p_werks AND
stlnr = t_stko-stlnr
and stlal in s_stlal.
ENDIF.
ENDIF.
else.
Write:/2 'List contains no data'.
stop.
endif.
loop at t_mast.
clear : v_maktx.
Start of change Seshu
Reason - Remove the new page option
if sy-tabix ne 1.
skip 1.
endif.
End of change Seshu
Get the material Description
select single maktx from makt into v_maktx
where matnr = t_mast-matnr
and spras = 'E'.
Get the material details from STKO Table
select single * from stko into wa_stko
where STLTY = 'M'
and STLNR = t_mast-stlnr
and STLAL = t_mast-stlal.
Main Header for Each Material
format color 5 on.
write:/2 'Material',20 'Material Description',65 'Alternative BOM',
90 'Base Qty', 115 'Base Unit'.
format color 5 off.
format color 1 on.
write:/2 t_mast-matnr,20 v_maktx,65 wa_stko-STLAL, 85 wa_stko-BMENG,
115 wa_stko-BMEIN.
format color 1 off.
Use the Function Module and get the format level by level
perform get_level_level.
clear : t_mast.
endloop.
ENDFORM. " get_data_component
*& Form obj_ident
text
FORM obj_ident.
weder Mat noch Doc
CHECK: T_stb-objty NE otyp_mat,
T_stb-objty NE ootyp_mat,
T_stb-objty NE otyp_doc,
T_stb-objty NE otyp_ntm.
?T418-WA schon ok
nein
IF T_stb-postp NE t418-postp.
T418 einlesen
PERFORM t418_lesen USING T_stb-postp.
ENDIF.
PERFORM cl_clstab_maint.
?MatNr-Eingabe bei diesem PosTyp moeglich
und keine Textposition
trifft zu
IF t418-matin NE '-'
AND t418-txpos IS INITIAL.
aktuelles Objekt ist Material NLAG
T_stb-objty = '1'.
PosKurztext in ObjKurztext uebernehmen.
T_stb-ojtxp = T_stb-potx1.
MODIFY T_stb.
ELSE.
IF T_stb-objty IS INITIAL.
T_stb-objty = '2'.
MODIFY T_stb.
ENDIF.
ENDIF.
ENDFORM. " obj_ident
*& Form t418_lesen
text
-->P_T_STB_POSTP text
FORM t418_lesen USING lkl_postp LIKE stpo-postp.
T418-WA initialisieren
CLEAR:
t418.
Key angeben
t418-postp = lkl_postp.
PosTypDefinition lesen
READ TABLE t418.
ENDFORM. " t418_lesen
*& Form cl_clstab_maint
text
FORM cl_clstab_maint.
nur fuer Klassenpositionen
CHECK t_STB-OBJTY EQ OTYP_KLA.
Teilkey der Klassenpositionentabelle
CL_CLSTAB-CLASS = t_STB-CLASS.
CL_CLSTAB-KLART = t_STB-KLART.
Klassenpositionentabelle lesen
READ TABLE CL_CLSTAB
WITH KEY CL_CLSTAB(21)
BINARY SEARCH.
aktuelle Klassenposition bereits in Klassenpositionentabelle
nein
IF SY-SUBRC <> 0.
Klassenposition in Klassenpositionentabelle hinzufuegen
INSERT CL_CLSTAB INDEX SY-TABIX.
ENDIF.
ENDFORM. " cl_clstab_maint
*& Form alv_stb_prep
Printing the data as LEVEL BY LEVEL
FORM alv_stb_prep.
CLEAR:
alv_stb,
stb_orig,
stb_add.
IF t_stb-hdnfo IS INITIAL.
stb_orig = t_stb.
IF t_stb-mngko >= max_num.
stb_add-ovfls = ueberl_kz.
ELSE.
IF t_stb-mngko <= min_num.
stb_add-ovfls = ueberl_kz.
ELSE.
CLEAR: stb_add-ovfls.
ENDIF.
ENDIF.
IF NOT t_stb-xtlnr IS INITIAL.
stb_add-bomfl = b_flag.
ENDIF.
IF NOT t_stb-knobj IS INITIAL
OR NOT t_stb-class IS INITIAL
OR NOT t_stb-kzclb IS INITIAL.
stb_add-knofl = 'X'.
ENDIF.
ELSE.
CHECK t_stb-stufe > 1.
alv_stb-info = 'C30'.
IF t_stb-ttidx <> t_matcat-index.
READ TABLE t_matcat INDEX t_stb-ttidx.
ENDIF.
stb_orig-hdnfo = t_stb-hdnfo.
stb_orig-stufe = t_stb-stufe - 1 .
stb_orig-ojtxp = t_stb-ojtxb.
IF NOT t_stb-altst IS INITIAL.
stb_orig-stlal = t_stb-stlal.
IF stb_orig-stlal(1) EQ '0'.
stb_orig-stlal(1) = ' '.
ENDIF.
ENDIF.
stb_orig-idnrk = t_matcat-matnr.
ENDIF.
CLEAR:
stb_add-dobjt,
stb_add-objic.
CASE t_stb-objty.
WHEN otyp_mat.
WRITE: stb_orig-idnrk TO ecfld.
stb_add-objic = '@A6@'.
WHEN 'M'.
WRITE: stb_orig-idnrk TO ecfld.
stb_add-objic = '@A6@'.
WHEN otyp_noo.
WRITE: stb_orig-potx1 TO ecfld.
stb_add-objic = '@0Q@'.
WHEN otyp_doc.
write stb_orig-doknr to ecfld. "note 489354
IF ecfld CP '*# '. ENDIF. "note 489354
sy-fdpos = sy-fdpos + 1. "note 489354
CONCATENATE
*d stb_orig-doknr "note 489354
stb_orig-dokar
stb_orig-doktl
stb_orig-dokvr
*d INTO ecfld "note 489354
INTO ecfld+sy-fdpos "note 489354
SEPARATED BY space.
stb_add-objic = '@AR@'.
WHEN otyp_kla.
CONCATENATE
stb_orig-class
stb_orig-klart
INTO ecfld
SEPARATED BY space.
stb_add-objic = '@7C@'.
WHEN otyp_ntm.
WRITE: stb_orig-intrm TO ecfld.
WHEN OTHERS.
ENDCASE.
*d CONDENSE ecfld. "note 515408
stb_add-dobjt = ecfld(40).
CLEAR: ecfld.
WRITE stb_orig-stufe TO stb_add-dstuf NO-SIGN.
*d MOVE-CORRESPONDING stb_orig TO alv_stb. "note 331962
MOVE-CORRESPONDING stb_add TO alv_stb.
MOVE-CORRESPONDING stb_orig TO alv_stb. "note 331962
APPEND alv_stb.
ENDFORM. " alv_stb_prep
*& Form get_level_level
text
FORM get_level_level.
REFRESH : T_STB,
T_MATCAT,
ALV_STB.
CLEAR : T_STB,
T_MATCAT,
ALV_STB.
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
capid = 'PP01'
datuv = sy-datum
mktls = 'X'
mehrs = 'X'
mtnrv = t_mast-matnr
stlal = '01'
stlan = '1'
stpst = 0
svwvo = 'X'
werks = p_werks
vrsvo = 'X'
TABLES
stb = t_stb
matcat = t_matcat
EXCEPTIONS
alt_not_found = 1
call_invalid = 2
material_not_found = 3
missing_authorization = 4
no_bom_found = 5
no_plant_data = 6
no_suitable_bom_found = 7
conversion_error = 8
OTHERS = 9.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CLEAR: hd_tab.
Entry der KlassenstatusTab. initialisieren
cl_clstab,
Entry 'Objekte von Klassen' initialisieren
cl_objmemo.
REFRESH: hd_tab.
SORT t_matcat BY index ASCENDING.
Get the All levels
loop at t_stb.
IF NOT t_stb-hdnfo IS INITIAL.
EXIT.
ENDIF.
Object Identification
PERFORM obj_ident.
READ TABLE hd_tab
WITH KEY stufe = t_stb-stufe
vwegx = t_stb-vwegx
BINARY SEARCH
TRANSPORTING NO FIELDS.
?gibt es diesen Satz schon
nein
IF sy-subrc <> 0.
dann in SFP-Infosatzverweistab. aufnehmen
*d APPEND HD_TAB. "HGH054648
hd_tab-stufe = t_stb-stufe.
"HGH054648
hd_tab-vwegx = t_stb-vwegx.
"HGH054648
INSERT hd_tab "HGH054648
INTO hd_tab "HGH054648
INDEX sy-tabix. "HGH054648
PosNr initialisieren
CLEAR: t_stb-posnr.
SFP-InfosatzKz setzen
t_stb-hdnfo = 'X'.
stb-objty = otyp_mat.
"HGE246532
als SFP-Infosatz in die STB aufnehmen
append t_stb.
ENDIF.
*del ENDIF.
clear t_stb.
endloop.
SORT t_stb ASCENDING BY stufe
index ASCENDING
*del POSNR ASCENDING. "HGC062735
posnr ASCENDING "HGC062735
hdnfo DESCENDING.
LOOP AT t_stb.
T_stb-index = sy-tabix.
MODIFY T_stb.
PERFORM alv_stb_prep.
ENDLOOP.
Displays the Value as Level by Level
loop at ALV_stb.
if sy-tabix = 1.
format color 3 on.
write:/2 'Level',12 'Item',22 'Component',
42 'Material Description',82 'Base Qty',
107 'Base Unit',120 'Assembly Indicator'.
format color 3 on.
endif.
if alv_stb-MEINs is initial.
v_flag = 'X'.
endif.
if v_flag = 'X'.
format color 5 on.
write:/2 ALV_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
42 alv_stb-OJTXP.
format color 1 off.
else.
if alv_stb-STUFE = '1'.
format color 1 on.
write:/2 ALV_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
42 alv_stb-OJTXP,72 alv_stb-mngko,
107 alv_stb-MEINs, 120 alv_stb-bomfl .
format color 1 off.
elseif alv_stb-STUFE = '2'.
format color 2 on.
write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
42 alv_stb-OJTXP,72 alv_stb-mngko,
107 alv_stb-MEINs,120 alv_stb-bomfl.
format color 2 off.
elseif alv_stb-STUFE = '3'.
format color 3 on.
write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
42 alv_stb-OJTXP,72 alv_stb-mngko,
107 alv_stb-MEINs,120 alv_stb-bomfl .
format color 3 off.
elseif alv_stb-STUFE = '4'.
format color 4 on.
write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
42 alv_stb-OJTXP,72 alv_stb-mngko,
107 alv_stb-MEINs,120 alv_stb-bomfl .
format color 4 off.
elseif alv_stb-STUFE = '5'.
format color 5 on.
write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
42 alv_stb-OJTXP,72 alv_stb-mngko,
107 alv_stb-MEINs,120 alv_stb-bomfl .
format color 5 off.
elseif alv_stb-STUFE = '6'.
format color 7 on.
write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
42 alv_stb-OJTXP,72 alv_stb-mngko,
107 alv_stb-MEINs,120 alv_stb-bomfl.
format color 6 off.
elseif alv_stb-STUFE = '7'.
format color 7 on.
write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
42 alv_stb-OJTXP,72 alv_stb-mngko,
107 alv_stb-MEINs,120 alv_stb-bomfl .
format color 7 off.
else.
format color 1 on.
write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
42 alv_stb-OJTXP,72 alv_stb-mngko,
107 alv_stb-MEINs,120 alv_stb-bomfl .
format color 1 off.
endif.
endif.
hide: alv_stb.
clear : alv_stb.
clear v_flag.
endloop.
ENDFORM. " get_level_level
*& Form f4_for_variant
text
FORM f4_for_variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = g_variant
i_save = g_save
i_tabname_header = g_tabname_header
i_tabname_item = g_tabname_item
it_default_fieldcat =
IMPORTING
e_exit = g_exit
es_variant = gx_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF g_exit = space.
p_vari = gx_variant-variant.
ENDIF.
ENDIF.
ENDFORM. " f4_for_variant
FORM E03_EVENTTAB_BUILD *
--> E03_LT_EVENTS *
FORM e03_eventtab_build USING e03_lt_events TYPE slis_t_event.
DATA: ls_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = e03_lt_events.
READ TABLE e03_lt_events WITH KEY name = slis_ev_top_of_page
INTO ls_event.
IF sy-subrc = 0.
MOVE gc_formname_top_of_page TO ls_event-form.
APPEND ls_event TO e03_lt_events.
ENDIF.
ENDFORM.
FORM E04_COMMENT_BUILD *
--> E04_LT_TOP_OF_PAGE *
FORM e04_comment_build USING e04_lt_top_of_page TYPE slis_t_listheader.
DATA: ls_line TYPE slis_listheader.
Listenüberschrift: Typ H
CLEAR ls_line.
ls_line-typ = 'H'.
LS_LINE-KEY: not used for this type
ls_line-info = text-001.
APPEND ls_line TO e04_lt_top_of_page.
Kopfinfo: Typ S
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-key = text-050.
ls_line-info = text-010.
APPEND ls_line TO e04_lt_top_of_page.
ls_line-key = text-051.
APPEND ls_line TO e04_lt_top_of_page.
Aktionsinfo: Typ A
CLEAR ls_line.
ls_line-typ = 'A'.
LS_LINE-KEY: not used for this type
ls_line-info = text-002.
APPEND ls_line TO e04_lt_top_of_ -
Create Workspace together with applications
Hi
The Background:
===============
I get the Users, Roles and Rights from the OID. In the OID I have no mapping which Rights has a Role an which Roles has a User, because it is an object oriented system, where a user can have differnt rights on thousands of objects.
Therefore the "Satellite-Systems" which uses the OID have to make the mapping Users, Roles, Rights themselves. I have 3 differnt tables replicated from the OID with these informations.
The goal:
=========
If somebody is requesting a Workspace he should have an application automatically generated with the tables, where the Workspace-Administrator can make the individual mapping Users, Roles, Rights. There should be predefined generated mappings and Authorization Schemes.
My Suggestion:
==============
I would generate a Schema with the tables replicated by the OID. There should be views (automatically generated) for every Workspace which is generated by the HTML DB Administrator. I would create a Mapping-Application where the Workspace Administrators can map Users, Roles and Rights individually. I would make some predefined Role/Right-Mappings and Authorization Schemes. Then I would export these application, authorization schemes and tables with rows and somehow generate it in every Workspace when a User is requesting a new Workspace
My Question:
============
How can I generate an ready built application, with tables and rows and authorization schemes for every requested Workspace? Ideally I can choose, if this application should be generated in the new Workspace.
Regards, JuergenJuergen,
I certainly don't have the whole answer for you right now. But you might find it useful to start by creating an application that has no components except the authorization schemes based on your authorization tables. Then, for each new workspace, import this application into the workspace using a new application ID. Each application created in the workspace would be expected to copy and subscribe to all the authorization schemes in this "authorization scheme repository" application. The application developers would also have to attach the authorization schemes to the appropriate application components.
Taking this a step further, you could create another application in your initial workspace that would be a starter application for developers to install in their new workspaces using a new application ID during each installation. This application would have the basic structure and shared components for developers to start out with. Then they would copy/subscribe to all the authorization schemes of the already installed "authorization scheme repository" application in their workspace.
I know this does not extend new workspace provisioning to include the automation that you might find desirable, but it's a start. Please advise if I'm missing your intent.
Thanks,
Scott
Maybe you are looking for
-
I'm changing online passwords for email and other online applications due to hacking in my mail account. Gaming applications are included in this process. Currently my Game Center account password is my Apple ID password. Can I change the Game Cen
-
Message mapping problem / experts needed / UDF?
Hello experts, I have the following problem in a message mapping: Source structure is as follows: - Node a (min 1, max 999) - Subnode b (min 0, max 999) - Each Subnode b has the element "number" (1,1) This structure must be mapped to the followin
-
Can i unlock my iphone 4s using my IMEI number via Apple ?
Can i unlock my iphone 4s using my IMEI number via Apple ?
-
Hi, I need to buy a soundcard wich could work under Windows NT4. Can you tell me if such a product still exist ? Evilo from France.
-
Hello! I´d like to know what´s the best way of creating a message box with a "Please Wait" message that opens at some point and closes automatically after a sequence code? Thank you! Luanna