Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass sort field for tasks in BAPI_ALM_NOTIF_SAVE

Former Member
0 Kudos

Hi All,

I have to create a service notification for IW51 through BAPI_ALM_NOTIF_SAVE.

The notification is getting created,with 2 default line items in task with code group PM1

I have to pass my own code group(ZOTH or ZRTI) to create task line item.

When I populate the task structure and pass it to the BAPI it returns message to maintain sort no.

My question is how to pass the sort no. to BAPI?

Thanks in advance

Nazmul

1 REPLY 1

Former Member
0 Kudos

Hi Nazmul,

It looks to me that you can put any value in this field. Just put a sequence in there based on some logic in your program, e.g. in case you process this BAPI in a loop use the table index as input.

This is what the long text of the message states:

Short Text

Faulty parameter in function module: & can not be blank.

Diagnosis

When a function module was called up, an obligatory parameter was transferred with a blank value (for example an empty character string).

System response

Processing will not be continued.

Procedure

Make sure that the specified parameter has a non-blank value when the module is called up.

This is the code which triggers the message:


* Object key must not be initial.
  if sortfield is initial.
    call function 'MESSAGE_SET_AND_CONVERT'
         exporting
              msg_class  = 'IS'
              msg_type   = 'E'
              msg_number = '498'
              msg_parm1  = 'SORTFIELD'
         importing
              return     = return.
    exit.
  endif.

Kind regards,

Robert