- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Getting unauthorized exception in SAP ABAP
To fix this issue, you need to add try/catch response to the code. When you don’t include an authorization header, it results in an error 401 from the server.
try { CatalogService.CatalogChangeClient service = new CatalogService.CatalogChangeClient(); service.ClientCredentials.UserName.UserName = "username"; service.ClientCredentials.UserName.Password = "password"; service.ClientCredentials.SupportInteractive = true; ProductUpdate[] products = new ProductUpdate[1]; products[0] = new ProductUpdate(); products[0].ProductCode = "00001"; products[0].ProductDescription = "TestProduct"; string result = service.UpdateProducts(products); } catch (Exception exception) { Console.WriteLine(exception.Message); }
- Related Articles
- Getting a syntax error unknown fields in SAP ABAP
- Getting error not assigned on running SAP ABAP program
- Negation logic in SAP ABAP
- Using logarithm in SAP ABAP
- Declare dynamically in SAP ABAP
- What is SAP ABAP?
- Create database view in SAP ABAP
- Sort Datetime Type in SAP ABAP
- Equivalent for Row_Number() in SAP ABAP
- Debugging an Asynchronous RFC in SAP ABAP
- Defining a variable reference in SAP ABAP
- Form a dynamic Query in SAP ABAP
- Information for obsolete functions in SAP ABAP
- Using real Boolean type in SAP ABAP
- Replace Tab with space in SAP ABAP

Advertisements