Program for Outbound IDOC





Program for Outbound IDOC

All IDoc data records are exchanged in a fixed format, regardless of the segment type. The segment’s true structure is stored in R/3’s repository as a DDic structure of the same name. The segment info tells the IDoc processor how the current segment data is structured and should be interpreted. The information, which is usually the only interest, is the name of the segment EDID4-SEGNAM.
The segment name corresponds to a data dictionary structure with the same name, which has been created automatically when defining the IDoc segment definition with transaction WE31 .
For most applications, the remaining information in the segment info can be ignored as being redundant. Some older, non-SAP-compliant partners may require it. E.g. the IDoc segment info will also store the unique segment number for systems, which require numeric segment identification.
To have the segment made up for processing in an ABAP, it is usually wise to move the segment data into a structure, which matches the segment definition. For a segment of type e1maram the following coding is commonly used:
TABLES: e1maram.

. . .

MOVE edidd-sdata TO e1maram.
Then you can access the fields of the IDoc segment EDIDD-SDATA as fields of the structure e1maram .
WRITE: e1maram-matnr.
The following coding sample, shows how you may read a MATMAS IDoc and extract the data for the MARA and MARC segments to some internal variables and tables.
DATA: xmara LIKE e1maram.

DATA: tmarc AS STANDARD TABLE OF e1marcm

WITH HEADER LINE.

LOOP AT edidd.

CASE edidd-segnam.

WHEN ‘E1MARAM’.

MOVE edidd-sdata TO xmara.

WHEN ‘E1MARCM’.

MOVE edidd-sdata TO tmarc.

APPEND tmarc.

ENDCASE.

ENDLOOP.

now do something with xmara and tmarc.

By :  Amit Khari



SAP BC TIPS – Execute a Function Module without using SE37





A number of companies restrict the execution of function modules in quality, pre-prod and prod environments, for good reason. Therefore you may find you do not have access to the transaction code SE37. Generally experienced developers may however have access to SE38.

So how do you execute or test a function module in a system/client but wish to get around the authorization issue? Simply use SE38 with program RSFUNCTIONBUILDER.

TIP – You can sometimes use the same technique by using SE93 with the problem transaction and using the program name however do not expect to be able to bypass all authorizations.

By: SAPtricks

Tags: , ,



SAP FI TIPS – Table relationships image





FI CO Table Mapping

2099431 f520 300x237 SAP FI TIPS   Table relationships image

FI CO Master Data

2099444 f520 300x234 SAP FI TIPS   Table relationships image

Tags: , , ,



SAP RANDOM Tips – SQVI – Create quick report





I’m going to show you how you can quickly build a custom report for reporting Sales Schedule Lines based on different filter criteria and multiple tables (VBAK, VBAP and VBEP: header, item and schedule line data resp.):

1) Go to transaction SQVI: In the section ‘Quickviews for …’ you may see some prepared reports already. Since you are new to this it is likely to be empty. Since we are going to create a new report enter a name for the report in the Quickview name field and press < Create>.

sqvi 300x127 SAP RANDOM Tips   SQVI – Create quick report

2) In the selection window enter descriptions and choose ‘Table join’ as ‘Data source’. This means we are going to connect and use multiple tables. Press <Enter> to continue.

3) In the screen ‘Choose data source’ press the ‘Insert table’ button. In the window that pops up enter the name of the table that you need.

sqvi add table1 300x198 SAP RANDOM Tips   SQVI – Create quick report

4) Repeat the previous step for all required tables. Your screen will now look like below:

sqvi tables1 300x95 SAP RANDOM Tips   SQVI – Create quick report

5) Press ‘F3′ to go to the configuration screen. In the left side of the screen you can select per table which fields are for selection and/or list purpose. E.g. if you only select a field as ‘List field’ it will show up in the report results, but will not appear in the selection screen of the report as a filter criterium. For the header I choose: document number, doc date, sales organization, distribution channel and sold-to party (all list and selection). On item level I select: Material Number and Reason for rejection (to be able to exclude rejected lines). Both List and Selection. For Schedule I pick: Item, Schedule Line, Schedule line category, Schedule line date and Confirmed qty. Only Schedule line category and date both List and Selection. The others only List. Now your screen will look like below.

sqvi fields 300x147 SAP RANDOM Tips   SQVI – Create quick report

6) Now it’s time to test drive your report! Press <Execute>. It takes a short time for SAP to build te report. You are taken to the selection screen of the report. Now it is important that you have an idea of what data you are going to find. Enter filter criteria based on this idea. I mention this because you need to validate the data you will be presented in the report. Do not just accept the quantities. Analyze the results and if the numbers are off find out why and adjust your report’s  filter criteria and/or add extra filters to remove redundant data.

sqvi report 299x186 SAP RANDOM Tips   SQVI – Create quick report

7) If you are satisfied with the quality of the report save it for future use. It is possible to link it to a transaction code and make it accesible for users through authorization. I will post a guide on this in the future.

By: SAP Mental Notes

Tags: , , , , ,



SAP SD Tips – MD04 – Export planning to Excel





Sometimes a planner wishes to share the planning status of a particular material with colleagues or partners that are not SAP users. In this case it is useful to export the planning overview to Excel and perhaps pimp the lay-out with some colorful headers.
To do this -from within MD04 or MD07- go to Menu > List > Variable Print.
Immediately a new overview opens up that may look less attractive than the overview you are used to. On the screen ‘Print list – variable’ you can change the lay-out and save it as a variant like you are used to in standard SAP reporting.
To get the best Excel results export the report directly to an Excel table, as opposed to first store it as a local file and then open it in Excel. This way the lay-out is optimized for direct filtering and sorting.
By: SAP Mental Notes

Tags: , , ,



SAP SD TIPS – What are the main reports in SD?





SD REPORTS:
Reports: Reports consist of data, which is expected to be reveiwed or checked the transaction taken in said period. Reports are useful for analysis of decision taking for future activities.

Some of the standard reports for SD & its configuration guide is as under:
Standard SAP SD Reports:=

Statistic Group:
Purpose – To capture data for Standard Reports, we require to activate Statistic Group as under:
–> Item category (Configuration)
–> Sales document type (Configuration)
–> Customer (Maintain in Master data)
–> Material (Maintain in Master data)
When you generate statistics in the logistics information system, the system uses the combination of specified statistics groups to determine the appropriate update sequence. The update sequence in turn determines for exactly which fields the statistics are generated.

Configuration:
IMG –> Logistics Information System (LIS) –> Logistics Data Warehouse –> Updating –> Updating Control –> Settings: Sales –> Statistics Groups –>
1. Maintain Statistics Groups for Customers
2. Maintain Statistics Groups for Material
3. Maintain Statistics Groups for Sales Documents
4. Assign Statistics Groups for Each Sales Document Type
5. Assign Statistics Groups for each Sales Document Item Type…..

All Standard Reports which are available are as under:
SAP Easy Access: Information Systems -> Logistics -> Sales and distribution ->
1. Customer -> Incoming orders / Returns / Sales / Credit memos / Sales activities / Customer master / Conditions / Credit Master Sheet
2. Material -> Incoming orders / Returns / Sales / Credit memos / Material master / …
3. Sales organization -> Sales organization / Sales office / Sales employee
4. Shipping point -> Deliveries / Returns
5. SD documents -> Orders / Deliveries / Billing documents …
& so on.

Sales summary – VC/2
Display Customer Hierarchy – VDH2
Display Condition record report – V/I6
Pricing Report – V/LD
Create Net Price List – V_NL
List customer material info – VD59
List of sales order – VA05
List of Billing documents – VF05
Inquiries list – VA15
Quotation List – VA25
Incomplete Sales orders – V.02
Backorders – V.15
Outbound Delivery Monitor – VL06o
Incomplete delivery – V_UC
Customer Returns-Analysis – MC+A
Customer Analysis- Sales – MC+E
Customer Analysis- Cr. Memo – MC+I
Deliveries-Due list – VL04
Billing due list – VF04
Incomplete Billing documents – MCV9
Customer Analysis-Basic List – MCTA
Material Analysis(SIS) – MCTC
Sales org analysis – MCTE
Sales org analysis-Invoiced sales – MC+2
Material Analysis-Incoming orders – MC(E
General- List of Outbound deliveries – VL06f
Material Returns-Analysis – MC+M
Material Analysis- Invoiced Sales – MC+Q
Variant configuration Analysis – MC(B
Sales org analysis-Incoming orders – MC(I
Sales org analysis-Returns – MC+Y
Sales office Analysis- Invoiced Sales – MC-E
Sales office Analysis- Returns – MC-A
Shipping point Analysis – MC(U
Shipping point Analysis-Returns – MC-O
Blocked orders – V.14
Order Within time period – SD01
Duplicate Sales orders in period – SDD1

Tags: , , ,



SAP BC TIPS – Date and Time validation





Sometimes,  we need to validate some inputs from users that are inserted by external sources (like files).

For this purpose, we found very useful function modules like CONVERT_DATE_TO_INTERNAL and CONVERT_TIME_INPUT to validate external dates formats and external times formats (ex: dates like ’24.06.1978′ or times like ’11:00:00′)

This functions are also very useful to convert the external information to internal information.

If you need more conversions of this kind, take a look at utility class CL_ABAP_DATFM.

Check if is helpful for you too, or if you have any other suggestions feel free to share with us!

Tags: , ,



SAP CRM TIPS – Buffering organizational structure





For that, a report HRBCI_ATTRIBUTES_BUFFER_UPDATE should be scheduled to run every night. But be careful, this report should only run after midnight for buffering the current day. If not, organizational data may be not available, and inconsistencies may occur.

Tags: , ,



SAP HR TIPS – Get user email from RH data in SAP





When sending one email, sometimes you use SY-UNAME as reference so this is the desired select:

select single usrid usrid_long  from pa0105
where pernr eq SY-UNAME
and subty eq 9003 (ASK HR Manager)
and begda le sy-datum
and endda ge sy-datum.

if usrid is empty use usrid_long

endselect.

And it’s this,

any doubts just post

Tags: ,



SAP BC TIPS – Inbound IDOC Background and Parallel Processing





When processing loads of iDocs, use program RBDAPP01 to process in parallel.

Be careful with locks, has they can occur, when processing concurrent records.

Tags: , ,

Copyright © 2010 ABOUT SAP. All rights reserved.