Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all 8332 articles
Browse latest View live

Function module /AIF/NOTIFY_IDOC_STATUS does not exist

$
0
0

Hi,

 

When I try to execute a PS IDOC using BAPI_IDOC_INPUT1 in WE19, my idoc goes to this error "FM /AIF/NOTIFY_IDOC_STATUS does not exist". We have no AIF config setup.

 

I debugged WE19 and found that this error is already in SYST fields while the IDOC processing starts in WE19. I am not sure why this error is pre-filled in the SYST structure and where from this error is coming??

 

Any help or suggestions?

 

- Ags


Additional field in Reservation Creation

$
0
0

User needs an optional input field Equipment Code in Reservation creation screen (MB21).

 

 

Please suggest the process to include this as a HEADER level field.

Status_read FM not working properly in outbound idoc

$
0
0

Hi all,

 

I am updating custom segment with status of quotation in outbound idoc FM (IDOC_OUTPUT_ORDRSP ) in exit EXIT_SAPLVEDC_003

 

1. Status_read Function module working fine for all status in runtime except approval status for pending status it is working fine. ( I checked the code with hardcoded text for approval Status and it works , So Jest table not  updating approval status at run time process ).

 

2. Status_read FM not returning approval status at runtime from va22 , but if we run the idoc manually then it works fine .

 

* Get BELNR ( Which will have the Sales order number in this interface )
       lv_vbeln = ls_e1edk01-belnr.

* Converting to internal format
       CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
         EXPORTING
           input  = lv_vbeln
         IMPORTING
           output = lv_vbeln.


       IF lv_vbeln IS NOT INITIAL.
* Get Sales Order Header details

         SELECT SINGLE vbeln
                       erdat
                       erzet
                       ernam
                       angdt
                       auart
                       objnr
                       ktext
                       vkorg FROM vbak INTO ls_vbak
                                   WHERE vbeln EQ lv_vbeln.
         IF sy-subrc EQ 0.

* Get the Status Profile and User Stauts
           CALL FUNCTION 'STATUS_READ'
             EXPORTING
               objnr            = ls_vbak-objnr
               only_active      = lc_x
             IMPORTING
               obtyp            = lv_obtyp
               stsma            = lv_stsma
               stonr            = lv_stonr
             TABLES
               status           = lt_status
             EXCEPTIONS
               object_not_found = 1
               OTHERS           = 2.
           IF sy-subrc EQ 0.
* Delete records other than the User status
             DELETE lt_status WHERE stat NA lc_e.

* Read the active user status
             READ TABLE lt_status INTO ls_status WITH KEY inact = space.
             IF sy-subrc EQ 0.
               IF lv_stsma IS NOT INITIAL AND ls_status-stat IS NOT INITIAL.
                 SELECT SINGLE txt30 FROM tj30t INTO ( lv_text )
                                       WHERE stsma EQ lv_stsma
                                        AND  estat EQ ls_status-stat
                                        AND  spras EQ sy-langu. "#EC WARN_OK
               ENDIF.
             ENDIF.
* Object status text
           ENDIF.
         ENDIF.


Please help me in this

badi implementation step

$
0
0

how to implement MB_RES_BAPI_CREATE1  ?

can any one give me step (for MB21/22/23- New header field ) ...

Error while confirmation of Order in Co11n?

$
0
0

Dear Expertise

 

I am using one exit for co11n.

CONFPP05

 

Now, In this I am using one validation  on BWART and RGEKZ(Backflush Indicator).

 

Now, when I run Co11n and enter the details, its working fine for my Error message which I have displayed if Backflush is null for Order No.

 

Now, when i press BACK or SAVE , it ask me with a POP UP "Do you want to save the confirmation"

I click on yes. It throws a dump as

 

Exception condition "DUPREC" triggered

 

 

I have already searched on this Dump but not able to sort out this issue.

 

Help me to sort out this issue gurus.

 

 

 

 

Thanks

 

karan

BAPI_ACC_DOCUMENT_POST and partial non deductible VAT

$
0
0

Hello,

 

I am facing a issue related to posting partial / non deductible VAT using BAPI_ACC_DOCUMENT_POST. I have been searching this forum along with many other forums but without success. At place I got suggession to use USER EXISTS to achive this but I am a new comer to this area and I am actually lost with USER EXISTS.

 

There is the scenario mentioned below:

 

There are certain Invoices where a part for the tax amount for the items can be recovered. I have provided an example below to understand the situation better:

 

 

The total invoice amount is 2048.18.

There are two lines:

a) Amount 1268.52 with 253.70 (20%) VAT

b) Amount 438.30 with 87.66 (20%) VAT

Total Tax: 341.36

 

Now, this invoice is entered like below:

Vendor Amount: 2048.18

a) Line One: 1268.52 + 126.85 = 1395.37 with a 0% tax (increasing the expense account cost)

b) Line Two: 438.30 with a 0% tax

c) Line Three with GL Account same as that of a tax GL account : Amount = 214.51 with Base Amount = 1072.55 with 20% tax (20% tax being calculated on the Base Amount 1072.55)

 

 

To handle this situation I tried two approaches and both have failed.

Approach 1:

a) Created vendor line with amount 2048.18

b) Created two GL lines with line amounts 1395.37 (N0 tax) and 438.30 (N0 tax) N0 tax code has 0% tax

c) Create a tax line with line amount 214.51 with base amount 1072.55 with N1 tax code N1 has 20% tax

d) This gave an error u201CTax amount must not be greater than tax baseu201D

 

My understanding is, in this approach system is trying to get the total of the GL line amounts with tax code N1 for its base amount, instead of taking the base amount that has been passed in the Tax line. This total is of course 0.00 and there fore less than the tax amount and thus results in this error.

 

 

 

Approach 2:

 

a) Created vendor line with currency amount 2048.18

b) Created two GL lines with currency amounts 1395.37 (N0 tax) and 438.30 (N0 tax) N0 tax code has 0% tax

c) Created the third GL lines with currency amount 214.51, base amount 1072.55 with N1 tax code N1 has 20% tax

d) The invoice got booked but when I open the Tax Data from FB02, I see the tax base amount as the line amount of the third line and the tax amount as 0.00

 

In this approach the third line got saved just like any other GL line where the base amount if passed cannot be more than the line amount. Thus the base amount for this third line defaulted to the line amount. The tax data is thus showing the tax amount as 0.00 as tax line does not exist.

 

 

I am a looking for a direction towards the solution and will be greatful if I get any help in that area.

 

Best Regards

Sutirtha

Classification Error in Compatable unit

$
0
0

Hi

 

I am creating CU using BDC after that creating  characteristics using FM : CREATE_OBJCL_CHANGE , its creating successfully ,

but the Problem is while releasing it is showing error Classification is in complete , even through there is a classification .

 

Can any one help on this issue.

 

Thanks & regards

Kiran

Issue with Field symbols

$
0
0

HI Experts,

 

I face an issue while using field symbols, kindly help me out. Here <lts_commercial> and <lfs_commercial> is of both same data type, but still I get the error message that the field "Product_guid" is not an component.

 

field-symbols:

               <lts_commercial> type ANY TABLE,

                <lfs_commercial> type any,

 

 

CREATE DATA ref_itab type STANDARD TABLE OF (lc_commercial)

             WITH NON-UNIQUE DEFAULT KEY.

 

       assign ref_itab->* to <lts_commercial>.

 

       create data ref_ls like line of <lts_commercial>.

       assign ref_ls->* to <lfs_commercial>.

 

       ASSIGN <ls_set>-data->* TO <lts_commercial>.

 

       READ TABLE <lts_commercial> into <lfs_commercial> with KEY product_guid = lt_comp_det-object_guid.

 

ERROR MESSAGE:

 

       The specified type has no structure and therefore no component called

       "PRODUCT_GUID". component called "PRODUCT_GUID".


Get Line Item Attachment from a PO

$
0
0

Hi,

 

I need to read line item level attachments from a purchase order. Can anyone guide, how to read these attachments?

I found the document number from the DRAD and DRAW tables. But I do not know the next steps to proceed.

The attachment type is PDF.

 

Thanks,

My own Function-Module to calculate duration between 2 dates and 2 times

$
0
0

I was searching for a function module that should calculate the duration of 2 tasks .

 

Import Parameter:

DATE_FROM

DATE_TO

TIME_FROM

TIME_TO

 

As result I need values separated into

YEARS

MONTHS

DAYS

HOURS

MINUTES

SECONDS

 

 

Most standard function deliver only one(1) result and than this return value is from type F (floating number, like 2,34546787E-03) and I did not want to convert the result into integer. Other standard functions look like they could work, but when I checked them I found that they where calculation wrong!

 

So I came to the conclusion to copy+paste what ever I can and I wrote my own function module using the SAP function module 'L_TO_TIME_DIFF' 

Here it is (check attachment)

 

 

Please comment if you find a BUG, I will try to solve it.

 

 

 


Germany, 16.01.2015

Jörg Sauterleute

Query: Excel option in OOPS ALV

$
0
0

Hi Experts,

 

I have sorted ALV below. The first column ID is sorted

 

Sorted ALV.JPG

On clicking the excel button in the alv toolbar, the data in excel is not coming similar to the above alv

 

ALV Excel.JPG On checking the row 2 in excel in the first column the value LH is correct which is similar to the ALV above. On checking row 5 in first column the LH is again displayed but it is not there in ALV.

 

I know that displaying the LH twice is not wrong. But for the user they want exactly the way ALV is sorted. Please advice if there is any solution to rectify this issue.

 

Thanks in advance.

 

Regards

Anand

Convert a spool id into a word document

$
0
0

Hi all,

 

I'm in the need of converting a spool id into a word document to download it afterwards. it has to be word format, not pdf.

 

If any of you know can tell me how to do this, I will be eternally grateful.

 

Kind regards,

 

Gregorio.

Update cost center for the purchase requisition, while creating PM order from IW81

$
0
0

Dear Guys,

 

While creating Plant maintenance order from IW81, Purchase Requisition also created without cost center.

 

But I have requirement to update the purchase requisition's cost center by plant maintenance's responsible const center. Is there any BADI or userexit availble to fulfil this requirement.?

 

Thanks,

K.Safiq

Background job goes into Cancelled state giving error : 'No authorization to execute external programs immediately'...

$
0
0

Dear Experts,

 

I have a requirement in which, during the creation of notifications I need to execute a Z-program by scheduling a background job on future date and time. Now to achieve this, I have used the FMs : JOB_OPEN, JOB_SUBMIT and JOB_CLOSE.

 

In these FMs, I am passing the Start date/time for the job that is going to be scheduled.The job is scehduled succesfully.

But when the time comes for the job to execute, it is continously going into CANCELED state.

 

The error logs of the job scheduled states :-

No authorization to execute external programs immediately.

SXPG_STEP_XPG_START: xpg_final_check: rc = 503.

Failed to receive scheduling status of external program.

Job cancelled.

 

NOTE : When I am scheduling the same report to execute in background in SE38, it is executed successfully.

 

Below are the screen shots for your reference. Please help me on this.

 

Job Scheduled.jpgJob error log.jpg

Changing filename of attachment using GOS

$
0
0

Hi Gurus ,

 

I am in the middle of the technical issue related to the  GOS_EXECUTE_SERVICE function module.

Everything is working fine but when i am attaching a file from my pc, it's taking the filename as it is. it sounds good.

But here comes the problem, i have a requirement of adding the filename starting with a common name.

Suppose i have attached a file and it's name is abc.pdf but i want to display it as zbp_abc.pdf.

 

Thanks and Regards.

Dhananjay


Three ABAP Games

$
0
0

Look what I've found.

 

Under the cloak of "Examples of Expression-Oriented Programming" recent versions of the Example Library of the ABAP Keyword Documentation contain three ABAP games.

 

Jaw Breaker

jawbreaker.gif

 

Not too demanding but colorful ...

 

 

Mine Sweeper

minesweeper.gif

 

Time-honored and well known ...

 

 

2048 Game

2048.gif

A recent smart phone game and a real challenge ...

 

 

Wanna play?

 

 

  • If you have a release older than 7.40, you can copy old fashioned 7.00 source code from the appended text file. Maybe you also have to replace the usage of CL_DEMO_INPUT with PARAMETERS then.

 

Only outside working hours, of course.

 

Wanna Contribute?

 

Maybe, the pattern used in these games (usage of CL_ABAP_BROWSER etc.) motivate you to create some other games?

Need Function Module for f-32(clearing customer open items)

$
0
0

Hi all,

 

 

 

        Need function module or class for clearing customer open items.could you please let me know if there is any BAPI for  performing f-32 Transaction code

 

 

 

Thanks in advance,

 

Devi

Create ARTMAS idoc triggered by a change pointer (filters, add data)

$
0
0

My requirement is to create an ARTMAS(ARTMAS02) outbound idoc triggered by a change pointer. I have just made the configuration of that point but my doubts are now in these two things:

 

 

- Where and how I could check segment field values?  Is there any badi or user-exit for that? I pretend to avoid the creation of the idoc if the fields don't pass the validations.

 

- Where I could add or change the values of some segment fields?

 

 

Thanks for your time.

 

 

Best Regards.

Moving data from Field-symbol to String

$
0
0

Hello Guru's,

 

I  build my logic with dynamic internal table concept.

In ordered to save data in Application server. I want to convert/Move

data from field symbol (<FS> TYPE ANY ) to string type.

 

My Dynamic table declarations are as below:

-----------------------------------------------------------------

FIELD-SYMBOLS:

   <FS_IT_OUTPUT>    TYPE STANDARD TABLE,

   <FS_WA_OUTPUT>  TYPE ANY,

   <FS1> ,

   <FS2> ."         TYPE any TABLE.



Sample code:


LOOP AT <FS_IT_OUTPUT> ASSIGNING <FS_WA_OUTPUT>.


        "Here i want to move field symbol work area to any String

        " so that i can save that data into Application server.

****************************************************

* Logic which i followed and failed are commented.

*      ASSIGN COMPONENT WA_COMP_FLD-NAME OF STRUCTURE <FS_WA_OUTPUT1> TO <FS1>.

*      ASSIGN <FS_WA_OUTPUT1> TO <FS1>.

*      MOVE <FS1> TO LW_RAW.

*      LW_RAW = <FS1>.

*      CLEAR LW_RAW.

*       LW_RAW = <FS_WA_OUTPUT1>.

*      TRANSFER LW_RAW TO P_TARGET_FNAME .

       "NO END OF LINE.

****************************************************

ENDLOOP. "LOOP AT <FS_IT_OUTPUT1> INTO <FS_WA_OUTPUT1>.




Please advise and do the needful.


Thanks in Advance.


Regards,

Sankarbabu


problem with sending rich text to pdf

$
0
0

Hi

I was required to develop a WD with formattedTextEdit ui and send the formatted text to pdf using rich text (i added to the pdf WDRTextEdit object in order to displaythe text in a rich text format).

The rich text are usually  displays the text from the wd formattedTextEdit ok.

The problem is that in some cases the text is not displayes at all in the pdf and in worst cases the pdf dosnt upload and stock the all pdf server so that no one can print pdf in the the system.

For example  when I write a text , add numbering and mark the middle word with bold - the textcomming from the wd  looks like this – "<ol><li>hello <strong>my</strong> world</ol></li>" – and displayed in the pdf ok.

But when I mark the last word in bold – "<ol><li>hello my <strong>world<strong></ol></li>" – the pdf not showing any text.

When I mark the first word in bold – "<ol><li><strong>hello<strong> my world</ol></li>" – the pdf not even uploaded and stock the pdf server.

Any comments are welcome...

 

Best regards

Aya.

Viewing all 8332 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>