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

How to add new partners into existing interfaces

$
0
0

Hello,

 

We have a few inbound and outbound interfaces to SAP and external vendor systems that flow through HUBSPAN. Now that the client has started doing business with new vendors, the same documents that are being distributed to current vendors must also be distributed to new vendors. What steps do I have to follow?

 

Alternatively, can we avoid HUBSPAN and propose the client to exchange data with PI as middleware? They are already having PI in their landscape. If so, what is the revamping strategy and steps involved? What is the criteria? Any graphical presentations on this revamp?    

 

Thanks,

Kiran


ME_print_po not working in PBS

$
0
0

HI ALL,

 

WE HAVE A REQUIREMENT TO PRINT THE ARCHIVED PURCHASE ORDERS USING TRANSACSTION /PBS/ME9F AND /PBS/ME23N.

 

I AM USING /PBS/READ_PO_FOR_PRINTING AND /PBS/ME_PRINT_PO TO READ AND PRINT THE ARCHIVED POs

 

BUT /PBS/ME_PRINT_PO IS RETURNING ME AN ERROR MESSAGE

 

M204 CROSS REFERENCE TABLE COULDNT BE UPDATED.

 

Kindly assist.

 

Thanks

Gaurav

Packing for Outbound Delivery

$
0
0

Hi All,

 

We need to implement Packing functionality for Outbound Delivery. It is a simple Item Packing in a HU.

 

I create HU using BAPI_HU_CREATE, then pack using BAPI_HU_PACK and tried assigning to the delivery with BAPI_HU_CHANGE_HEADER.

 

The item appears to be packed under the HU, but the Packing flag is not updated. So I tried using WS_DELIVERY_UPDATE.

 

It keeps throwing an error saying ' Cannot be processed with this transaction'. Has anybody worked on this? Is there anyway to achieve this?

 

Thanks,

Geetha

Return Messages after PRELIMINARY_POSTING_FB01

$
0
0

Hi,

 

I am using ' PRELIMINARY_POSTING_FB01' for parking a document, but this does'nt return the return messages either error /success, so I used the code as below

 


CALL FUNCTION'PRELIMINARY_POSTING_FB01'IN BACKGROUND TASK
              EXPORTING
                i_tcode           = l_tcode
                i_tcode_int       = l_i_tcode
               TABLES
                 t_bkpf           = i_bkpf[]
                 t_bseg           = i_bseg[]
                 t_bsec           = i_bsec[]
                 t_bset           = i_bset[]
                 t_bsez           = i_bsez[] 

 

if sy-subrc = 0.


MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 INTO x_return_suc_msg-message.

*              APPEND x_return_suc_msg TO i_return_suc_msg.

endif.

 

But this throws an error saying Message is of type 'A' 'E' 'I' 'W' 'X'.

 

Please let me know how to get the messages returned here.

 

Regards,

Mohammed


Open dataset with Windows linefeed in 4.6C

$
0
0

Hi Gurus,

 

I'm facing an "old" problem : I must generate a flat file in background mode with basic datas.

 

As I am in background mode, in a program triggered by an SM37 job, i'm using  OPEN DATASET technique .

 

BUT I'm requested to have Windows linefeed (CR LF) and not Unix Linefeed (CR) .

 

The problem in 4.6C  is that we DON'T have the possibilities

-> OPEN DATASET ....WITH WINDOWS LINEFEED

-> class CL_ABAP_CHAR_UTILITIES

 

 

Any idea will be seen with pleasure

 

Best regards,

Cyril

Difference in FM

$
0
0

HI experts,

 

What is the difference between FM


Reuse_ALV_LIST Display and

LVC_ALV_LIST_DISPLAY

 

Output seems to be same. from both FM

 

Thx

SS

Smartform New page Issue

$
0
0

Dear Experts,
I have got a typical requirement where i need to display the smartform in the below manner.

Internal table is getting filled up in the driver program itself. I am just looping the itab into a work area in a template.

 

                                             Employee Location and Designation Details

 

Employee Number                                                                                                                             012345

Employee Name                                                                                                                                Mr. Pernr

Employee Joining Date                                                                                                                       01/01/1995

Employee DOB                                                                                                                                  02/02/1972

Employee Contact No                                                                                                                         0987654321

Employee Email ID                                                                                                                             pernr@email.com

 

 

Location                                                                                                                                             Delhi

 

Designation1                                                                                                                                      Fresher(01/01/1995 to 01/02/1996)

Designation2                                                                                                                                      Associate Engineer (01/03/1996 to 01/04/1997)

 

 

Location                                                                                                                                              Mumbai

 

Designation1                                                                                                                                       Associate Engineer(05/04/1997 to 01/04/2000)

Designation2                                                                                                                                       Program developer (01/05/2000 to (01/07/2005)                                             

Designation3                                                                                                                                       Senior Developer    (03/07/2005 to (01/07/2010)

 

Location                                                                                                                                              Hyderabad

Designation1                                                                                                                                       Senior Developer    (03/07/2010 to (01/07/2011)

Designation2                                                                                                                                       Architect (05/07/2011 to 12/01/2012)

 

 

 

 

 

 

 

 

 

 

Date : 12/03/2013                                                                                                                                       Page : 1

 

 

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

 

If the data overflows to the second page for the same employee number the it should be displayed as below

 

                                             Employee Location and Designation Details

 

Employee Number                                                                                                                             012345

Employee Name                                                                                                                                Mr. Pernr

 

 

 

Location                                                                                                                                              Mumbai

Designation1                                                                                                                                       Architect (05/01/2012 to 12/06/2012)

 

 

 

Location                                                                                                                                              Kolkata

 

Designation1                                                                                                                                       Sr. Architect (05/07/2012 to 12/01/2013)

Designation2                                                                                                                                       Sr. Arc (Module lead) (12/01/2013 to till date)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Date : 12/03/2013                                                                                                                                       Page : 2

 

 

and again if a new employee no comes, then all the details should e displayed as freshly in a new page like the sample 1

 

I am not able to understand how to do, Kindly guide.

 

Regards,

Swarnadee.pta

user exit message only once

$
0
0

Hi

 

I am currently working on a SD requirement, in VA01 after giving sold to party details on enter it should raise a warning message comparing few conditions.

 

Yes it is pretty easy, i am using user exit MV45AFZZ and routine USEREXIT_MOVE_FIELD_TO_VBAK.

 

While testing the warning message is displaying again and again like after enter sold to party, its displaying the warning message.

 

again if we give any line item again the code is executed and displaying the warning message.

 

If we miss any header data along with that message first warning message is displayed and then missing data message is displaying.

 

Can some one tell me how to display this only once.

 

PS: I can do this using EXPORT and IMPORT a flag to memory, but is there any other better way?

 

Regards,

NK


How to handle 'Page Scaling' option of printer properties in SPAD?

$
0
0

The requirement is to print automatically a PDF document in Background. The print was successful, but there is sizing problem in the print out taken.

 

Can we handle the 'Page Scaling' option of the printer properties inside SAP?

 

As the print formats like A4, LETTER can be controlled in the 'Print controls' tab in Device type configuration in SPAD, is it possible to shrink the document to the printable area by using a similar option found in Printer properties- Page scaling like "Fit to Printable Area" or "Shrink to Printable Area" ?

 

Kindly share your thoughts on the same.

 

Regards,

Gaayathri.

RESB - link between Father child

$
0
0

Hi,

If i enter in the table resb with AUFNR for example I have 10 records.

these records are father and sons

how to find the connection between father and son.

 

Thanks to all

 

Liam

SAP memory, SMO, singleton classes related to each user's activity

$
0
0

Hi all gurus,

facing a challenging task and would like to ask you for some clarifications...

 

In short; an user has to select a value from a WD custom popup. This value should then be retrieved in a standard method (by enhancing it) that follows in the process flow.

 

The problem is that between the popup and the method, a new user session is started ( the process I'm talking about is the creation of a shopping cart in SRM).

 

So:

- 1 - i tried to create a singleton class with GET & SET methods... but this is not working, as after the SET , a new user session starts and the previous singleton class instance is lost;

- 2 - I tried to "convert" the above class into a Shared Memory Area enabled one... defining the binding at Application Server level, it works. In the method in which I have to get the value, that is correctly retrieved.

But SMO seems not to fit with my requirement, as it's not user-specific. To better understand the issue, think about two users, say A and B, which are both processing that execution flow. Considering the following sequence:

  1. user A selects a value (say "foo") from the popup; this is stored in SMA.
  2. user B selects a different value (say "bar") from the same popup just a second after user A; this value OVERRIDES the previous one stored in SMA, as SMA is not user-specific!
  3. As a result, when the execution flow for user A reaches the method in which the value is retrieved... the resulting value will be "bar", and not "foo".

 

I then read about SAP Memory which seems to be:

- user-specific;

- usable on multiple sessions from the same user.

 

I then tried as follows: when I have to set the value, I used the following instruction:

EXPORT proctype from proctype TO MEMORY ID 'ZPROCTYPE'.

where obviously proctype variable contains the user selection.

 

In the method, I used the following statement:

IMPORT proctype TO proctype  FROM MEMORY ID 'ZPROCTYPE'.

 

and, as in the case -1- of the singleton class, I get an empty value. Please notice that if I try to get the value BEFORE the new session is started, I can retrieve it correctly.

 

What am I missing? Does SAP Memory guarantee communication between multiple sessions started by the same user?

 

Any help will be highly appreciated ... as the question is quite urgent.

Thanks in advance

Message type " " is unknown.ALSM_EXCEL_TO_INTERNAL_TABLE

$
0
0

Dear Experts,

    Why i used ALSM_EXCEL_TO_INTERNAL_TABLE,it occurs error

Error analysis

  Only message types A, E, I, W, S, and X are allowed.

Message type " " is unknown.

 

Would you please help check this case and give advice?

 

Best Regards,

Merry

Return the value in Generic table in RFC

$
0
0

Hi All,

 

The 'HR_READ_INFOTYPE' function module will read the records of particular Infotype.

 

As per the requirement, the HR_READ_INFOTYPE is need to be used as BAPI. Hence we developed a RFC as below.

 

FUNCTION zbapi_hr_read_infotype.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(IM_PERNR) TYPE  PRELP-PERNR
*"     VALUE(IM_INFTY) TYPE  PRELP-INFTY
*"  EXPORTING
*"     VALUE(ED_XMLSTRING) TYPE  XSTRING
*"----------------------------------------------------------------------
   DATA: w_infty TYPE char5.

   FIELD-SYMBOLS: <i_tab> TYPE STANDARD TABLE.

   DATA w_dref TYPE REF TO data.

   CONCATENATE 'P' im_infty INTO w_infty.

   CREATE DATA w_dref TYPE TABLE OF (w_infty).

   ASSIGN w_dref->* TO <i_tab>.

   CALL FUNCTION 'HR_READ_INFOTYPE'
     EXPORTING
*   TCLAS                 = 'A'
       pernr                 = im_pernr
       infty                 = im_infty
*   BEGDA                 = '18000101'
*   ENDDA                 = '99991231'
*   BYPASS_BUFFER         = ' '
*   LEGACY_MODE           = ' '
* IMPORTING
*   SUBRC                 =
     TABLES
       infty_tab             = <i_tab>
* EXCEPTIONS
*   INFTY_NOT_FOUND       = 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.

*  CALL TRANSFORMATION id
*     SOURCE itab = <i_tab>
*     RESULT XML ed_xmlstring.


ENDFUNCTION.

 

The problem is, we need to return the generic table <i_tab> value in RFC. But Generic type are not allowed in RFC.

 

As per the guidance given in some links, I tried to convert data to XSTRING.

 

*  CALL TRANSFORMATION id
*     SOURCE itab = <i_tab>
*     RESULT XML ed_xmlstring.

 

But again if we want to move XSTRING data to an internal table, it should also be

 

a generic table. Hence guide me on how to handle this.

 

Regards,

Gurulakshmi

SM37 extended Job selection

$
0
0

HI,

 

I want to remove the mandatory field Username on the extended job selection screen in SM37.

I mean the username field should not be mandatory. How can we do this?

Sending a mail if error in Job Schedule

$
0
0

I am uploding bank statements BAI2 flat data in SAP. I Scheduled a job for FF_5 Transaction to upload. Here if any document could't upload properly or gives error, have to notify that and i have to send a mail to xxxxx@domain.com. So, how can i achieve this? any ideas please. Thanks in advance


Storage location and Amount fields in Inbound ORDERS05 IDOC

$
0
0

Hello Experts,

 

I am having a scenario wherein we receive external POs and post the ORDERS05 IDOC.

 

I could map almost all the fields except storage location and amount. I tried various qualifiers of E1EDP02 and E1EDP19 but couldn't find it populated.

 

It seems E1EDP01 does have LGORT field but the inbound module doesn't identify it as the storage location on Sales order. Also Amount field I am mapping into NETWR field of E1EDP01 but is not getting populated.

 

Thanks in advance.

 

Regards

BAPI_CONTRACT_CHANGE Item Condition Validity To Date Change

$
0
0

Hi Folks,

 

I am using the BAPI above to change the validity end date on an item condition on a purchasing contract.

 

In ME32K I can select the line>Item>Conditions and change the Valid To value.

 

However, when I use the BAPi to achieve the same result, what actually happens is delimits the old condition and then creates a new validity date range.

 

e.g. I want to change the validity end date form 31.12.9999 to 01.04.2011

Before

01.01.2011 to 31.12.9999

 

After

01.01.2011 to 01.04.2011

02.04.2011 to 31.12.9999

 

Does anyone know what I could be doing wrong?

Add more code to other people's program

$
0
0

Hi,

 

The program I will fix was developed by somebody else and It is already in Production.

 

In Dev:

 

1. From SE38, "ABAP Editor: Initial Screen", I see the "Activate" button, but this is not where I suppose to modify the program

 

 

2. I typed my program name in "ABAP Editor: Initial Screen" and get the source code. After I added my code, I only see "Save" button and don't see "Activate" button in the source code screen as below:

 

 

 

I am just wondering do I need to activate the program after the save? if so, should I go back the "ABAP Editor: Initial Screen" to activate the program? If not, does it mean the change is activated automatically in the system?

 

 

Your input will be much appreciated

Printing PDF attachment FROM GOS into Smartform

$
0
0

Hi!

In our system there are PDF attachments to QM notifications through GOS (generic object services).

 

My task is to print all of the PDF attachments during the notifications's printout. The notification's printing part is fully own development, using smartforms.

 

My questions are the following:

- how can I retrieve the complete PDF attachments from the GOS

- how can I pass the attachments to the printer program/smartform?

 

Thank you in advance

Tamas

Reg:Auto Invoice Creation After Pgi

$
0
0

Dear Experts,

 

Please help me regarding this.....

 

In my requirement my user wants to create an invoice automatically and sends it to local printer for printing when PGI button is clicked on Vl01n/Vl02n

 

screen with respect to delivery.

 

I tried using Badi LE_SHP_DELIVERY_PROC. In this badi i tried methods save_document_prepare,SAVE_AND_PUBLISH_DOCUMENT,SAVE_AND_PUBLISH_BEFORE_OUTPUT,SAVE_AND_PUBLISH_DOCUMENT.

 

I tried userexits in SAPMV50A~MV50AFZ1----USEREXIT_SAVE_DOCUMENT,USEREXIT_SAVE_DOCUMENT_PREPARE.

 

my sample code as follows...

 

BREAK-POINT.
data : t_vbrk     type TABLE OF bapivbrk," WITH HEADER LINE,
        w_vbrk     type  bapivbrk ,"WITH HEADER LINE,
        return     type TABLE OF bapiret1," WITH HEADER LINE,
        w_return   type  bapiret1," WITH HEADER LINE,
        success    type TABLE OF BAPIVBRKSUCCESS," WITH HEADER LINE.
        w_success  type  BAPIVBRKSUCCESS ,"WITH HEADER LINE.
        xlikp      type  likp.
loop at ct_xlikp into xlikp.
if xlikp-vkorg eq 'RME1' and sy-ucomm eq 'WABU_T'.

    w_vbrk-ordbilltyp = xlikp-fkarv.          " likp MANDATORY
    w_vbrk-ref_doc    = xlikp-vbeln.         " likp MANDATORY
    w_vbrk-ref_doc_ca 'J'.                    " hard code MAINTAINED IN LIKP TABLE MADATORY
    append w_vbrk to t_vbrk.
    CLEAR w_vbrk.
CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'
   EXPORTING
*   CREATORDATAIN   =
     TESTRUN               = 'X'
*   POSTING               =
   TABLES
     BILLINGDATAIN       = t_vbrk
*   CONDITIONDATAIN  =
*   CCARDDATAIN         =
*   TEXTDATAIN            =
*   ERRORS                  =
     RETURN                   = return
     SUCCESS                = success.
   endif.
   endloop.

But I am getting error in Return table as "VF 066 Goods issue has not been posted for the delivery"...

 

Kindly please help me on this to find a right userexit/badi after the PGI Posted .....

I need to close this immediately.....

 

anybody please help me on this....

 

Thanks and Regards

 

Mahesh.P


Viewing all 8332 articles
Browse latest View live


Latest Images

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